You are here:
Execute Application Tests
Select the Apex and flow tests that you want to run. Then examine the results, analyze error messages, and inspect your Apex source code.
Required Editions
| Available in: Salesforce Classic (not available in all orgs) and Lightning Experience |
Available in: Enterprise, Performance, Unlimited, Developer, and Database.com Editions See Supported Editions for Flow Builder and Licenses for Integrated Features |
- From Setup, enter Application Test Execution in the Quick Find box, then select Application Test Execution.
- Click Select Tests.... If you have Apex classes that are installed from a managed package, you must compile these classes first by clicking Compile all classes on the Apex Classes page so that they appear in the list. See Manage Apex Classes.
-
Select the tests to run. The list of tests includes only classes that contain test
methods.
- To select tests from an installed managed package, select the managed package’s corresponding namespace from the drop-down list. Only the classes of the managed package with the selected namespace appear in the list.
- To select tests that exist locally in your organization, select [My Namespace] from the drop-down list. Only local classes that aren't from managed packages appear in the list.
- To select any test, select [All Namespaces] from the drop-down list. All the classes in the organization appear, whether or not they are from a managed package.
Classes with tests currently running don’t appear in the list.
- To opt out of collecting code coverage information during test runs, select Skip Code Coverage.
- Click Run.
After selecting test classes to run, the selected classes are placed in the Apex job queue for execution. The maximum number of test classes you can select for execution is the greater of 500 or 10 multiplied by the number of test classes in the org per 24-hour period. For sandbox and Developer Edition organizations, this limit is higher and is the greater of 500 or 20 multiplied by the number of test classes in the org.
While tests are running, you can select one or more tests and click Abort to cancel.
After a test finishes running, you can:
- Click the test to see result details, or if a test fails, the first error message and the stack trace display.
- Click View to see the source Apex code.
Test results display for 60 minutes after they finish running.
- Inspect Code Coverage Results
After you run tests using the Application Test Execution page, you can view code coverage details in the Developer Console. - Disable Parallel Test Execution
Tests that are started from the Salesforce user interface (including the Developer Console) run in parallel. Parallel test execution can speed up test run time. Sometimes, parallel test execution results in data contention issues, and you can turn off parallel execution in those cases. - Use the Independent Auto-Number Sequence Test Option
The Independent Auto-Number Sequence setting helps to avoid gaps in auto-number fields caused by test records created in Apex tests. This option isolates the auto-number sequence used in Apex tests from the sequence used in your org. As a result, the creation of test data in Apex tests doesn’t cause the sequence ofauto-number fields to be higher for new non-test records. - View Application Test Results
From Setup, enter Application in the Quick Find box, select Application Test Execution, then click View Test History to view all test results for your org, not just tests that you have run. Test results are retained for 30 days after they finish running, unless cleared. - View Application Test Results Details
View all test results for your org in the default view for 30 days unless cleared, not just tests that you have run. - View Application Test History
The Application Test History page shows all the test results associated with a particular test run. The page shows results only for tests that have been run asynchronously.

