---
schema_version: "1"
id: 5508554fc0bec996420f6a28b8cabbee16fe63be84837909f461192f35d29f36
title: Resolve Apex Test Failures
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform-pkg-exchange/managed_packaging/guides/first-generation/resolving-test-failures.md
canonical_url: https://developer.salesforce.com/docs/platform/pkg2-dev/guide/resolving-test-failures.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 036741582bd535654c7e283c22e4cf3b6daebdd756d38a66966748cd87b5eb26
products:
  - Second-Generation Managed Packaging Developer Guide
  - merged-docs
---

# Resolve Apex Test Failures

Package installs or upgrades may fail for not passing Apex test coverage. However, some of these failures can be ignored. For example, a developer might write an Apex test that makes assumptions about a subscriber's data.

If your install fails due to an Apex test failure, check for the following:

- Make sure that you’re staging all necessary data required for your Apex test, instead of relying on subscriber data that exists.
- If a subscriber creates a validation rule, required field, or trigger on an object referenced by your package, your test might fail if it performs DML on this object. If this object is created only for testing purposes and never at runtime, and the creation fails due to these conflicts, you might be safe to ignore the error and continue the test. Otherwise, contact the customer and determine the impact.
