Versions Compared

Key

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

...

  1. Copy the <INSTALL_DIR>/coverage/dotNET/dottest_agent folder to the machine where IIS is installed and the web application is deployed.
  2. Run a console as an Administrator on this machine.Invoke the Agent Client tool on this machine to enable runtime coverage collection inside IIS
  3. To launch the dotTEST application coverage UI, run the agent client in the console using the following command:
    Code Block
    agent_client.exe

    Note: If you want to collect coverage information for multiple users that are simultaneously accessing the same web application server, invoke the Agent Client with the -multiuser switch:

    Code Block
    agent_client.exe -multiuser

    agent_client initializes the environment for the web server (IIS) and behaves like a service, enabling you to execute tests and collect coverage. The service is ready and waiting for commands as long as the following message is printed to the output:

    Code Block
    Write 'exit' and hit Enter to close agent_client
    Info

    A test session and test can be started even if the tested website or application has not been loaded yet.

  4. Ensure that port 8050 (default port for the coverage agent) allows HTTP traffic in firewall settings on this machine. You can change the coverage agent port number if the default port is unavailable.
  5. Choose IIS Web Application and click Next.
  6. (Optional) Configure the following settings:
    • Application URL: Specifies the URL of an application which you will be able to run from the application coverage UI.
    • Advanced settings:
      • Enable simultaneous collection of coverage for multiple usersEnables collecting coverage information for multiple users.
      • Coverage output directorySpecifies the path to the coverage data output directory.
      • Coverage scope file: Specifies the path to the coverage scope configuration file. It is required if the scope is other than the default.
      • Agent REST API port: Specifies the custom port number to use when starting the coverage agent if the default port is unavailable.
      • Agent connection timeout (milliseconds): Specifies the timeout for a connection with the coverage agent. The default value is 1500 ms. 
        Info

        If you provide 0 or a negative value, the connection attempt will not timeout, which may lead to a considerable slowdown or cause the tool to hang indefinitely.

      • Data flushing interval (milliseconds): Specifies how often to flush data.
      • Maximum number of coverable lines: Specifies a limit for the number of lines that can be covered.
      • Skip SSL for connecting to the agent: Enables connecting via HTTPS.
      • Skip SSL certificate validation: Enables using a self-signed SSL certificate.
        • Certificate pathSpecifies the path to a PFX file that stores the SSL certificate.
        • Certificate hash: Specifies the hash of the SSL certificate for the port that is used by the coverage agent.
        • Certificate password: Specifies the password for the SSL certificate stored in a PFX file.
  7. Click Next. Coverage will be collected for all applications residing on the IIS server.
  8. (Optional): Perform tests on the specified application and view the coverage API:
    • Start Application - Allows you to run the specified application and perform tests on it.
    • Swagger - Allows you to view coverage API in Swagger, start/stop a session, and download a coverage file.
    • Scalar - Allows you to view coverage API in Scalar, start/stop a session, and download a coverage file.
  9. Click Stop Coverage Agent to finish collecting coverage from all applications.
  10. Click Finish to close the application coverage UI, or New Session to configure a new coverage collection session.
  11. Ensure that port 8050 (default port for the coverage agent) allows HTTP traffic in firewall settings on this machine. You can change the coverage agent port number if the default port is unavailable.
  12. Start the application and Start the application and verify that the agent is ready by opening <host>:8050/status in your browser. You should receive the following response:

    Code Block
    {"session":null,"test":null}
  13. Configure soatest.properties to collect coverage for the AUT. Several application coverage parameters are supported (see Application Coverage Settings), but configuring the following settings is suitable for most cases:

    Code Block
    application.coverage.enabled=true
    application.coverage.agent.url=http://localhost:8050
    application.coverage.binaries=c:/<PATH_TO_APPLICATION_PDB_FILES>/bin
    application.coverage.binaries.include=<INCLUDE_PATTERN>
    application.coverage.binaries.exclude=<EXCLUDE_PATTERN>

    Be sure the path for the application binaries is to the folder containing the application PDB files.

...

  1. Copy the <INSTALL_DIR>/coverage/dotNET/dottest_agent folder to the machine where you intend to run the standalone application.
  2. Run the coverage_wizard.exe in that folder, specifying the following:
    • Full path the application
    • Command line arguments
    • Working directory
  3. Select the .NET CLR version used by the application.
  4. Enter the directory where the scripts generated by the wizard will be saved in the Target scripts directory field.
  5. Enable the Use Coverage Agent option and enable or disable the Collect coverage without admin privileges option as appropriate.
    • By default, admin privileges are required to collect coverage with coverage agent, but you can configure the tool to collect coverage by users without admin privileges. Doing so will cause two additional .bat scripts to be generated: runCamAgentInit.bat and runCamAgentUninit.bat. Run the runCamAgentInit.bat script with admin privileges to setup and initialize the coverage agent. When testing is completed, run the runCamAgentUninit.bat script to stop the process.
  6. Click Finish. The wizard will generate scripts in target script directory specified above.
  7. Run a console as an Administrator on this machine and change directories to where the scripts were generated.
  8. Execute runCamAgent.bat.
  9. Run another console as an Administrator and execute monitorCoverage.bat.
  10. intend to run the standalone application.
  11. To launch the dotTEST application coverage UI, run the agent client in the console using the following command:
    Code Block
    agent_client.exe
  12. Choose Desktop Application and click Next.
  13. Configure the following settings:
    • Full path to the tested application: Specifies the full path to the tested application for which coverage will be collected. You will be able to run this application from the application coverage UI.
    • Application command-line argumentsSpecifies the application command line arguments.
    • Application working directorySpecifies the path to the working directory.
    • (Optional) Advanced settings:
      • Enable simultaneous collection of coverage for multiple usersEnables collecting coverage information for multiple users.
      • Coverage output directory: Specifies the path to the coverage data output directory.
      • Coverage scope file: Specifies the path to the coverage scope configuration file. It is required if the scope is other than the default.
      • Agent REST API port: Specifies the custom port number to use when starting the coverage agent if the default port is unavailable.
      • Agent connection timeout (milliseconds): Specifies the timeout for a connection with the coverage agent. The default value is 1500 ms. 
        Info

        If you provide 0 or a negative value, the connection attempt will not timeout, which may lead to a considerable slowdown or cause the tool to hang indefinitely.

      • Data flushing interval (milliseconds): Specifies how often to flush data.
      • Maximum number of coverable lines: Specifies a limit for the number of lines that can be covered.
      • Skip SSL for connecting to the agent: Enables connecting via HTTPS.
      • Skip SSL certificate validation: Enables using a self-signed SSL certificate.
        • Certificate pathSpecifies the path to a PFX file that stores the SSL certificate.
        • Certificate hash: Specifies the hash of the SSL certificate for the port that is used by the coverage agent.
        • Certificate password: Specifies the password for the SSL certificate stored in a PFX file.
  14. Click Next. The specified application will be run and coverage will be collected. Perform tests on the application.
  15. (Optional): View the coverage API:
    • Swagger - Allows you to view coverage API in Swagger, start/stop a session, and download a coverage file.
    • Scalar - Allows you to view coverage API in Scalar, start/stop a session, and download a coverage file.
  16. Click Stop Coverage Agent to finish collecting coverage from the application.
  17. Click Finish to close the application coverage UI, or New Session to configure a new coverage collection session

    Configure soatest.properties to collect coverage for the AUT. Several application coverage parameters are supported (see Application Coverage Settings), but configuring the following settings is suitable for most cases:

    Code Block
    application.coverage.enabled=true
    application.coverage.agent.url=http://localhost:8050
    application.coverage.binaries=c:/<PATH_TO_APPLICATION_PDB_FILES>/bin
    application.coverage.binaries.include=<INCLUDE_PATTERN>
    application.coverage.binaries.exclude=<EXCLUDE_PATTERN>
    Be sure the path for the application binaries is to the folder containing the application PDB files.
Note

Multiuser coverage is not currently available for standalone applications.

...