Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2023.1

...

The test impact analysis (TIA) functionality analyzes the coverage data for the application under test (AUT) and determines which tests have been affected by changes since the previous build. You can pass these tests to the SOAtest command line interface and SOAtest will execute only the subset of tests identified by TIA in order to validate the changes. The following overview describes the test impact analysis process: 

  1. Configure the coverage agent (agent.jar) shipped with SOAtest and attach it to your AUT.
  2. Configure your settings to enable SOAtest to communicate with the agent for creating the baseline coverage report.
  3. Run your full test suite with the new configuration to collect information about what test cases cover and generate the baseline coverage report.
  4. Run the tests affected by change. Run a job that executes SOAtest and passes the baseline coverage report through the -impactedTests argument to run the tests affected by change. This is typically done as part of a CI/CD pipeline for quick validation of code changes.

Configuration

TIA is intended to be implemented as part of an automated process. Perform the following steps to enable TIA.

...

Executing Tests Impacted by Change

When a new version of the application under test is available, you can run a test impact analysis. To execute only the tests reported by TIA, use the -impactedTests argument, which limit the tests that are run to only those impacted by changes in the AUT:

...

  • -include: Specifies tests that should always be run regardless of whether or not they are part of -impactedTests.
  • -exclude: Specifies tests that should not be run regardless of whether or not they are part of -impactedTests.

When using the -impactedTests argument, be sure to pay attention to the settings below. See application coverage settings for more information about these settings. In the example above, these would be configured in the SOAtest settings file specified by the -settings argument.

  • application.coverage.binaries: Set to the binaries for the modified version of the application under test.
  • application.coverage.binaries.include: Optional, but recommended. If neither this nor application.coverage.binaries.exclude is configured, analysis of binaries will take longer and analyze more of the application than needed.
  • application.coverage.binaries.exclude: Optional, but recommended. If neither this nor application.coverage.binaries.include is configured, analysis of binaries will take longer and analyze more of the application than needed.

See Testing from the Command Line Interface - soatestcli for details about building test execution commands with SOAtest.