Versions Compared

Key

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

...

The Parasoft Application Coverage solution enables you to measure application code coverage while executing tests against your running applications. This enables you to gauge the effectiveness of your existing test suite, determine where additional tests need to be added, and more efficiently execute tests as the application evolves. You can collect application coverage by utilizing the coverage agent shipped with Parasoft Jtest and Parasoft dotTEST, which allows you to monitor the application as tests are being performed.

Application coverage is obtained by merging static and dynamic (runtime) coverage data into one coverage file and uploading the file to DTP for viewing.

...

Before you start collecting coverage with SOAtest, you need to configure the application under test (AUT) using Parasoft dotTEST or Parasoft Jtest. For details how to perform the following steps, see the Jtest or dotTEST user guide at docs.parasoft.com. Ensure that your SOAtest, dotTest, and JTest versions are in sync to avoid unexpected issues.

  1. Generate a static coverage file on a build machine. The file contains metadata about user classes, methods, and lines.
  2. (Optional) Customize the coverage agent by configuring the coverage agent options. This step is required if you are collecting coverage information for multiple users that are simultaneously interacting with the AUT. 
  3. Attach the coverage agent to the AUT.

...

  1. Specify the installation directory of dotTEST or Jtest by doing one of the following:
    • UI: go to Parasoft> Preferences> Reports> Coverage.
    • Command line: set via the localsettings settings properties "jtest.install.dir" or "dottest.install.dir" as appropriate (see Configuring LocalsettingsSettings).
  2. Configure a SOAtest Test Configuration to collect, merge, and upload application coverage data. You can configure an existing test configuration or create and configure a new one (see Creating a Custom Test Configuration).
    1. Open the Test Configuration that you want to configure to collect application coverage data.
    2. Open the Execution> Application Coverage tab.
    3. Enable the Collect application coverage option.
    4. Under Coverage agent host, specify the hostname or IP address where the application under test and coverage agent are hosted.
    5. Under Coverage agent port, specify the port number of the agent. The port number should match the value of the jtest.agent.port setting in the agent.properties file (default is 8050). 
    6. Under Coverage agent protocol, specify whether to connect to the coverage agent using http or https protocol. The default is http. 
    7. (Optional) Under Coverage agent user ID, you can specify a user ID so that coverage results can be associated with a specific user. A user ID should only be specified when the coverage agent is configured to run in multi-user mode. See the DTP Engine documentation for details.
    8. You can click Test Connection to verify that SOAtest can communicate with the coverage agent. 
    9. Enable the Upload coverage report to DTP option.
    10. Configure the Static coverage file location option to specify the path to the static coverage file generated with dotTEST or Jtest in the .xml or .data format (see Creating a Custom Test Configuration).
    11. Configure the Coverage image tags option to specify a set of tags that are used to create coverage images in DTP. A coverage image is a unique identifier for aggregating coverage data from runs with the same build ID. For details, see the Parasoft DTP user guide at https://docs.parasoft.com.
    12. Enable the Report coverage agent connection failures as test failures option for test failures to be reported when the coverage agent connection fails, or when the static coverage file location is misconfigured. Otherwise, the problems will be reported to the console, but will not cause the test to fail.
    13. Click Apply to save your changes.
  3. Configure a SOAtest localsettings settings file that sets:
    • The build ID (build.id) based on how you want to correlate coverage results. If you want to merge SOAtest coverage results with results from other types of testing—such as unit testing and manual testing of the same application—they must all use the same build ID. The build ID set here must match the build ID set for dotTEST or Jtest when collecting the static and dynamic coverage files and uploading the coverage data.
    • The project (dtp.project). This value must match the dtp.project value that will be set for dotTEST or Jtest when collecting the static and dynamic coverage files.

...

Run your tests in command line mode using the Test Configuration and localsettings settings file you have configured (see Configuring SOAtest to Collect and Upload Coverage). This step should be part of an automated process.

...