---
schema_version: "1"
id: a1cf6dd3a531608c8c30c773d255640263ef23232f72fbb4e64a68728595e470
title: Create a Test Run
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/code_dev_console_test_runs_creating.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.code_dev_console_test_runs_creating.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d654c759bb0b667271de66f622bb64452fcc21bfb444cbd4ff949c62d8ac73c7
description: A test run is a collection of classes that contain test methods. Set up a test run in the Developer Console to execute the test methods in one or more test classes.
products:
  - Salesforce Platform
release: "264"
---
# Create a Test Run

A test run is a collection of classes that contain test methods. Set up a test run in the Developer Console to execute the test methods in one or more test classes.

1. In the Developer Console, click **Test** | **New Run**.
2. To limit how many tests can fail before your run stops, click **Settings**. Enter a value for Number of failures allowed, and then click **OK**.
    
    To allow all tests in your org to run regardless of how many tests fail, set Number of failures allowed to -1 or don’t provide a value. To stop the test run from executing new tests after a specified number of tests fail, set Number of failures allowed to a value from 0 to 1,000,000. A value of 0 causes the test run to stop if any failure occurs. A value of 1 causes the test run to stop on the second failure, and so on. Keep in mind that high values can slow performance. Each 1,000 tests that you add to your Number of failures allowed value adds about 3 seconds to your test run, not including the time that the tests take to execute.
    
    This value applies for all test runs that you execute until you close the Developer Console or set a new value.
3. To opt out of collecting code coverage information during test runs, click **Settings** and select **Skip Code Coverage**.
    
    You can speed up Apex test runs by opting out of collecting code coverage information when you want faster feedback on pass or fail status rather than coverage data. When you opt out, no data about Apex test coverage is stored.
    
    This value applies for all test runs that you execute until you close the Developer Console or set a new value.
4. Select a class in the Test Classes column.
    
    To filter the list of classes, type in the **Filter test classes (\* = any)** box. To select specific test methods, click a test class and then select the tests from the center column. You can hold down the SHIFT or CTRL key to select more than one test class. To select all methods in all classes that you’ve highlighted, click **Add Selected**.
    
    ![Select Tests window](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/extend_code/images/code_dev_console_tests_select_tests.png)
5. When all the methods you want to run are included in the Selected Tests column, click **Run**.
    
    The test run appears in the Tests tab. To stop a test, click **Test** | **Abort**. If your test methods call other methods or classes defined as tests in your organization, those methods and classes are also run.
6. From the Tests tab, expand the test run to see the results for each method invoked by each class in the run.
    
    Test classes don’t require code coverage, so they show 0% coverage in the Overall Code Coverage pane and don’t affect the overall code coverage percentage.
7. Double-click the completed test run to open the results in detail view. This detail view displays the tested class, the tested method, the duration, result (skip, pass, or fail), and an optional error message.
    
    If a test failed, the Stack Trace column shows the method and line number at which the test failed. You can’t access logs for synchronous test runs in the Tests tab. However, you can access all test runs’ logs in the Logs tab.
8. To see the coverage that a test method provides for each class in the Class Code Coverage pane, select the method.
9. To clear the current results, click **Test** | **Clear Test Data**.

#### See Also

- [Tests Tab](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_tab_tests.htm&release=264.0.0&type=5 "Use the Developer Console to set up test runs, run tests, and check Apex code coverage.")
- [Checking Code Coverage](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_tests_coverage.htm&release=264.0.0&type=5 "The Developer Console retrieves and displays code coverage information from your organization. Code coverage results come from any tests you’ve run from an API or from a user interface (for example, the Developer Console, the Salesforce Extensions for Visual Studio Code, or the Application Test Execution page).")