In this section:
Setting Environment Variables
Setting environment variables for the components used in this tutorial is not required, but doing so may improve clarity.
DTP_HOME = DTP Server installation directory. Used for reference.
JTEST_HOME = DTP Engine for Java installation directory.
WORKING_DIR = Base directory for this tutorial.
MONITOR_DIR = Location for CAM agent monitor files.
PROJECT_DIR = Location of the Calculator project.
REPORT_DIR = Directory for test results.
TOMCAT_DIR = Tomcat used for CAM, installation directory.
JAVA_HOME = Java JDK installation directory.
M2_HOME = Maven installation directory.
CYGWIN_HOME = Cygwin installation directory. Cygwin is used only for cURL only in this tutorial.
Setting Up the Environment
Configure an envSetup.bat batch file in the working directory (C:\Working\CAM\) with the following contents:
This batch file should be executed after opening any command window used in this tutorial. Alternatively, these could be setup in your System Variables.
Setting Up DTP
Open the DTP homepage in a browser and log into Report Center. The default URL on a local machine is Preparing DTP for Application Coverage.. The default username and password is admin/admin. This should be changed before deploying DTP for general usage. The default user in this tutorial must have the ability to create and configure DTP Projects. Additional steps for setting up DTP are covered in
Setting Up the Working Directory
- Create a working directory for the example project and associated files: C:\Working\CAM
- Copy the Calculator example project folder from %JTEST_HOME%\Examples to C:\Working\CAM. The project is copied to maintain the integrity of the original project in the distribution.
Setting Up the DTP Engine for Java
- Open a command window and run the C:\Working\CAM\envSetup.bat script.
- Change to the %WORKING_DIR%\calculator folder.
- Run the following command:
- This will output a list of test configurations available for the DTP Engine to run.
- If you do not get this list or if you get errors related to licensing, check the settings in the %JTEST_HOME%\jtestcli.properties configuration file. In most cases at minimum, you need the following settings configured:
Downloading the cam.war File
The CAM package will be available soon at http://marketplace.parasoft.com. Until then, contact your Parasoft representative for cam.war download information.
Setting Up the Tomcat Server
CAM currently requires a custom configured Tomcat server with environment setup for CAM and the tested applications.
- Verify that Tomcat is installed at %TOMCAT_DIR% (see CAM Tutorial Requirements).
- By default, Tomcat is configured to use the following ports:
- Open a web browser to http://localhost:8080 or use other means to verify that these ports are available.
- If the default ports are not available, modify the %TOMCAT_DIR%\conf\server.xml configuration file to make the following replacements in order to use ports that are available:
- 8080 => 7080
- 8009 => 7009
- 8005 => 7005
- 8443 => 7443
- Perform a global replacement in the file for each and save the changes.
- Open a command window and run C:\Working\CAM\envSetup.bat.
- Run the
catalina startcommand to start the Tomcat server.
- Open the following URL in a web browser to verify that the server runs properly:
You should see the Tomcat homepage.
- Close the browser and run the
catalina stopcommand to stop the server.
Setting Up Maven
Complete details for setting up the Jtest Maven Plugin can be found in the DTP Engine for Java documentation: %JTEST_HOME%\manuals\plugins-manual.html
- If you have been using Maven, then a settings.xml file should already exist in the C:\Users\<YOUR_LOGIN>\.m2\ directory. If this file does not exist, copy the settings.xml file to this directory from the %MAVEN_HOME%\conf\ directory.
- Edit the settings.xml file as follows:
Add the following profile to the
Add the following mirror to the
- Save your changes.