AppCode 2019.3 Help

Run with coverage

AppCode provides a dedicated action that allows you to run tests with code coverage measurement.

Run a test with code coverage

  1. Do one of the following:

    • Open the desired file in the editor, and choose Run <name> with Coverage from the context menu. When running tests with coverage, note that you can run the entire test class, or each individual test method, depending on the caret location.

    • Select the desired run/debug configuration, and then from the main menu choose Run | Run <run/debug configuration name> with coverage.

    • On the main toolbar, click the Run <run/debug configuration name> with Coverage button Run <run/debug configuration name> with coverage. This will launch the selected run/debug configuration.

  2. If the Show options before applying coverage to the editor checkbox has been selected on the Coverage page of the Preferences dialog ⌘,, a dialog appears where you can choose whether you want to replace the active coverage suites, add the collected data to the active suites, or not to apply coverage data. You can also opt to skip this dialog in the future.

    In case any other option has been selected, the respective action will be performed silently.

  3. Explore the collected coverage data in the Coverage Tool Window.

Last modified: 6 February 2020