AppCode 2021.2 Help

Code coverage

Code coverage allows you to see how much of your code is being executed during unit tests, so you can understand how effective these tests are. AppCode uses llvm-cov for gathering the coverage data.

Code coverage results are displayed in the Coverage tool window, in the Project view of the Project tool window, and in the editor.

The coverage measurement results comprise a coverage suite. You can have the results of a new simulation merged with any existing suite. In this case, a line will be considered covered if it is covered by at least one of the simulations.

Run with code coverage

General steps for using code coverage in a project

  1. Specify how you want to process the coverage results.

  2. Create tests for the target code.

  3. Run with coverage, using the dedicated command from the main menu Run | Run with Coverage, or click the Run with Coverage button the Run with Coverage button.

  4. Once the run with coverage has been executed, you can perform the following actions:

Last modified: 13 October 2021