---
schema_version: "1"
id: fa8f2445e998a2eb382a236af12d60600369fae20ba18a47adf1f69824d33fed
title: Execute Application Tests
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/code_test_execution.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.code_test_execution.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b003dcfd9fc8e150f176b143263f6da6688a6077f9633c957ceb207b06905911
description: Select the Apex and flow tests that you want to run. Then examine the results, analyze error messages, and inspect your Apex source code.
products:
  - Salesforce Platform
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic (<a href="https://help.salesforce.com/s/articleView?id=xcloud.overview_edition_lex_only.htm&amp;language=en_US" target="_blank">not available in all orgs</a>) and Lightning
              Experience</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available in: <span id="code_test_execution__Apex_Code_editions_text"><a name="code_test_execution__Apex_Code_editions_text"><!-- --></a><strong>Enterprise</strong>,
                  <strong>Performance</strong>, <strong>Unlimited</strong>, <strong>Developer</strong>, and <strong>Database.com</strong>
                  Editions</span></p>
              <p style="margin-bottom:0;">See <a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;type=5&amp;language=en_US" target="_blank">Supported Editions for Flow Builder and Licenses
                  for Integrated Features</a></p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:74%">
          <col style="width:26%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d7466e85">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d7466e85 ">
              <span id="code_test_execution__class_perm_text"><a name="code_test_execution__class_perm_text"><!-- --></a>To define, edit, delete, set security, and set version
                settings for Apex classes:</span>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d7466e85 ">
              <span id="code_test_execution__apex_perm_value"><a name="code_test_execution__apex_perm_value"><!-- --></a>Author Apex</span>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d7466e85 ">
              <span id="code_test_execution__class__runtest_perm_text"><a name="code_test_execution__class__runtest_perm_text"><!-- --></a>To run Apex tests:</span>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d7466e85 ">
              <span id="code_test_execution__apex_runtest_perm_value"><a name="code_test_execution__apex_runtest_perm_value"><!-- --></a>View Setup and Configuration</span>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d7466e85 ">To open, edit, or create a flow test in Flow Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d7466e85 ">Manage Flow</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d7466e85 ">To view test run details in Flow Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d7466e85 ">View All Data</td>

          </tr>
        </tbody>
      </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_note.png)

Note Only flow tests created with [automated flow testing](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_record_data_cloud_triggered.htm&type=5&language=en_US) in Flow Builder are supported.

1. From Setup, enter Application Test Execution in the Quick Find box, then select **Application Test Execution**.
2. 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](https://help.salesforce.com/s/articleView?id=platform.code_manage_packages.htm&release=264.0.0&type=5 "An Apex class is a template or blueprint from which Apex objects are created. Classes consist of other classes, user-defined methods, variables, exception types, and static initialization code.").
3. 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.
4. To opt out of collecting code coverage information during test runs, select **Skip Code Coverage**.
5. 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](https://help.salesforce.com/s/articleView?id=platform.code_test_execution_coverage.htm&release=264.0.0&type=5)**  
    After you run tests using the Application Test Execution page, you can view code coverage details in the Developer Console.
- **[Disable Parallel Test Execution](https://help.salesforce.com/s/articleView?id=platform.code_test_execution_disable_parallel.htm&release=264.0.0&type=5)**  
    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](https://help.salesforce.com/s/articleView?id=platform.code_test_execution_idependent_test_option.htm&release=264.0.0&type=5)**  
    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](https://help.salesforce.com/s/articleView?id=platform.code_test_results.htm&release=264.0.0&type=5)**  
    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](https://help.salesforce.com/s/articleView?id=platform.code_test_results_details.htm&release=264.0.0&type=5)**  
    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](https://help.salesforce.com/s/articleView?id=platform.code_test_history.htm&release=264.0.0&type=5)**  
    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.

#### See Also

- [Open the Developer Console](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_opening.htm&release=264.0.0&type=5 "It takes only a couple of clicks to open the Developer Console from Salesforce Classic or Lightning Experience. The Developer Console is an integrated development environment with a collection of tools you can use to create, debug, and test applications in your Salesforce org.")
- [View Application Test Results](https://help.salesforce.com/s/articleView?id=platform.code_test_results.htm&release=264.0.0&type=5 "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](https://help.salesforce.com/s/articleView?id=platform.code_test_results_details.htm&release=264.0.0&type=5 "View all test results for your org in the default view for 30 days unless cleared, not just tests that you have run.")
- [Automatically Test Record-Triggered and Data Cloud-Triggered Flows](https://help.salesforce.com/s/articleView?id=platform.automate_flow_test_record_data_cloud_triggered.htm&type=5&language=en_US)
- [_Tooling API Reference Guide_: REST Resources for Unit Testing](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/intro_rest_resources_testing.htm)