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. 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.
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:
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
.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.