In this section:
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:
TIA is intended to be implemented as part of an automated process. Perform the following steps to enable TIA.
Deploy your application under test. An application packaged in any zip-based file format, including zip, war, jar, and ear, is supported, as is a hierarchical directory structure that contains standalone class files or class files embedded within a zip-based file.
SOAtest includes a Java agent that generates the coverage information necessary for SOAtest to determine which tests are affected by changes.
The agent is shipped in the <INSTALL>/coverage
directory. It takes configuration settings from the agent.properties file in the same directory. You should copy the coverage directory that contains the agent.jar and agent.properties files to the machine where the AUT is running.
See Application Coverage for details.
Configure the appropriate application coverage settings and run your full test suite to collect the data and generate the baseline coverage report:
soatestcli.exe -data <Your Workspace> -resource <Your Tests> -settings <Properties File with SOAtest Settings> -config <Your Team's Test Configuration> |
If you already have an automated test run, you can point to its properties file in the -settings
argument.
See Testing from the Command Line Interface - soatestcli for details about building test execution commands with SOAtest. You can also manually run tests from the SOAtest GUI.
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:
soatestcli.exe -data <Your Workspace> -impactedTests <Path to Baseline Coverage Report> -settings <Properties File with SOAtest Settings> -config <Your Team's Test Configuration> |
Optional filters:
-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.See Testing from the Command Line Interface - soatestcli for details about building test execution commands with SOAtest.