- Open a command prompt and navigate to the %WORKING_DIR%\calculator directory.
- Run the following command to generate the monitor.zip file:
mvn -Dmaven.test.skip=true clean install jtest:monitor -Djtest.publish
You should see BUILD SUCCESS at the end of the output. - A %WORKNG_DIR%\calculator\target\jtest\monitor folder that contains a monitor.zip file will be created in the previous step. Unzip the contents of monitor.zip into %WORKING_DIR%. This will create a monitor folder in %WORKING_DIR% that contains the following files:
- static_coverage.xml - a file that contains static coverage information
- agent.jar - a Jtest Java coverage agent jar archive
- agent.properties - the agent settings file that contains scope parameters generated during the build process, as well as other attributes
- agent.sh/agent.bat - a script that generates the Jtest Java agent VM arguments necessary for attaching the agent to the Application Under TEST Open the %WORKING_DIR%\monitor folder and run the agent.bat script. A command window will open and display a JVM arg string to add to your Tomcat server startup process:
-javaagent: "C:\Working\CAM\monitor\agent.jar"=settings="C:\Working\CAM\monitor\agent.properties",runtimeData="C:\Working\CAM\monitor\runtime_coverage"
Create a batch file in your Tomcat installation to use this information:
%TOMCAT_DIR%\bin\setenv.bat Add "set CATALINA_OPTS=%CATALINA_OPTS% " followed by the javaagent string above to the batch file and save changes. set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:"C:\Working\CAM\monitor\agent.jar"=settings="C:\Working\CAM\monitor\agent.properties",runtimeData="C:\Working\CAM\monitor\runtime_coverage"
This should all be added in a single string.
Overview
Content Tools