This page lists the command line options for
Configuring the Test Configuration
This option allows you to specify the test configuration that will be used for analysis. The option must be followed by the name of a built-in, user-defined, or DTP-hosted test configuration. Examples:
jtestcli -config "builtin://Critical Rules"
jtestcli -config "user://My_Config"
jtestcli -config "dtp://New_Rules"
This option prints a list of available test configurations and can be used to obtain a valid test configuration name you can pass with the
You can specify a pattern to filter available configurations. Examples:
-listconfigs builtin(prints all built-in test configurations)
-listconfigs builtin*Top*(prints all built-in configurations whose names include "Top")
See Configuring Test Configurations for details.
Configuring the Input Scope
This option specifies the location of the custom json.data.file. See Creating a Custom .json Data File.
-resource <path relative to the project>
This option narrows down the primary testing scope defined in the JSON data file. You can use Ant-style wildcards to specify patterns. Examples:
-resource ProjectName/src(analyzes every file in the selected directory and its subdirectories)
-resource ProjectName/**/*.java(analyzes every Java file from selected project)
-resource **/src/main/java/my/company/*.java(analyzes every Java file from the specified subdirectory of every project in current build)
-resource c:/resource.lst(analyzes the projects listed in the
resource.lstfile; specify one project name per line)
You can use this option multiple times on the same command line to specify multiple resources.
-include <absolute path> and -exclude <absolute path>
These options narrow down the primary testing scope defined in the JSON data file. They allow you to specify files and packages to be included or excluded during testing. You can use Ant-style wildcards to specify the resource.
You can provide one of the following:
- a fully-qualified name of a resource
- an absolute path on disk with the "path:" prefix
include com/**(tests all files in packages whose qualified names begin with "com)
include **/*Account(tests files whose qualified names end with "Account")
include path:**/Bank.java(tests only Bank.java files)
include path:C:/Project/src/**(tests all subdirectories and files in C:/Project/src/)
include path:C:/Project/src/examples/runtime/*(tests all files in C:/Project/src/examples/runtime, but not subdirectories)
include c:/include.lst(tests all files listed in the include.lst file ; each line is treated as a single pattern)
exclude **/internal/**(tests everything in the primary testing scope except files that have "internal" as part of the package name)
exclude path:**/tests/**(tests everything in the primary testing scope except the files in the "tests" folder)
.lstfile and pass the file with the
-excludeswitch. Each line in the file will be treated as a single entry.
This option specifies project compilation data you want to add or overwrite in a JSON data file. It allows you to manually modify your JSON file by configuring the classpath, bootpath,sourcepath, binarypath, encoding, and sourcelevel with one of the following instructions:
- prepend <path to file>- Adds one or more entries at the beginning of the list. You can specify a comma-separated list of paths to multiple files.
- append <path to file> - Adds one or more entries at the end of the list. You can specify a comma-separated list of paths to multiple files.
- set <value> - Overwrites the current value.
Acceptable patterns :
- compilations.encoding.set=<character encoding>
- compilations.sourcelevel.set=<project source level>
See Compilation Data Model for details.See Configuring the Test Scope for details about configuring the test scope.
Creating a Custom JSON
This set of options allows you to manually create a custom .json data file Jtest will use for analysis. You can use Ant-style wildcards to configure the options. If you want to configure more than one value, you can list the values in a
.lst file and pass the file with the command line option.
This option enables generation of the .json file by specifying the root of the project. Provide an absolute path to an existing directory.
By default, an
example.data.json file is created in the root of the project configured with this option but you can customize the location and name of the .json file using
All paths included in the Jtest report generated after analysis will be relative to the root of the project configured with this option.
This option specifies a custom location and name of the .json file you want to create. Ensure you provide a path to an existing directory.
This option specifies the name of the project.
This option specifies encoding of the project.
This option specifies the source of project. You can this option multiple times to specify multiple source folders.
This option specifies the Java compiler compliance level.
This option specifies specifies the classpath.
This option specifies the path to the JDK installation directory.
This option specifies the path to the directory with jars that you want to append to the project classpath.
You must view the JSON file when created to verify the order of the jars and ensure it meets your project requirements.
This option specifies the path to the XML file with JUnit test results that will be used to generate a report. You can this option multiple times to specify multiple report files.
This option specifies the path to the compiled project classes that will be used to generate metadata information required to perform the "Calculate Application Coverage" configuration.
This option specifies the path to the directory where the report will be created.
This option sends the results to DTP. See Sending Results and Publishing Source Code to DTP.
This option specifies the path to a custom .properties file that includes customized settings in the following format:
report.format=pdf). You can use this option multiple times to specify several .properties files. Entries with the same key will be overwritten. Example:
This option allows you to configure a single setting directly in the command line. Use the following format:
You can use this option multiple times to configure several settings on the same command line. Earlier entries with the same key will be overwritten. Examples:
-property session.tag=sa_linux -property report.dtp.publish=true -property techsupport.create.on.exit=true
This option prints the current settings and customizations.
See Configuration Settings for the list of settings you can configure.
This option specifies a path to the coverage.xml file that contains static coverage data.
This option specifies the path to the runtime coverage data file downloaded via CAM or generated by SOAtest. Alternatively, you can provide a path to a folder that contains multiple runtime coverage data files from more than one testing session.
See Application Coverage for details.
This option prints your machine ID.
-encodepass <your password>
This option prints an encoded password that can be used in the .properties configuration file.
This option specifies the path to a custom location of the .jtest directory, where run-specific data is stored during analysis.
This option increases console verbosity to display progress details.
-autoconfig <project [email protected]_name:port>
This option specifies a project stored on DTP that includes configuration settings. With this option enabled, Jtest is automatically configured with the settingst stored in the specified DTP project and does not need to be configured in a locally stored .properties file.
-property option to provide the credentials required to authenticate on DTP.
This option fails the command by returning a non-zero exit code if violations or setup problems are reported (see Command Line Exit Codes for details about exit codes returned if the process fails).
This option prints information about the version of the Parasoft tool you are using.
This option prints the command line help.