...
Conditional Content | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||
OverviewJtest DTP Engine is launched by running The UsingBuilBuild System Plug-insTypically, the
Using |
Code Block |
---|
jtestcli.exe -settings settings.properties -config "builtin://Recommended Rules" -data demo.data.json -report report |
AnchorSpecifying Test Data Location Specifying Test Data Location
Specifying Test Data Location
Specifying Test Data Location | |
Specifying Test Data Location |
Use the -data
switch to point directly to a *.json
data file object generated by the build system plugin. The automatically-generated *.json
data file provides the same information as the workspace in a format specific to Jtest DTP Engine:
Code Block |
---|
-data file |
Build system plug-ins automatically add the data argument and include the value they generate, so there is no need to add it to the plug-in configuration.
Settings Property Pattern
The path to the data file can be configured with the jtest.data
option in the .properties file:
Code Block |
---|
jtest.data=[path to file] |
Data File Format
The data file (jtest.data.json
) is a stream of json objects automatically generated and formatted by Jtest build system plug-ins. It provides the same information about tested projects as the workspace. Each object in the file describes one project. Jtest currently supports the classpath_project common object type. See Configuring the Test Scope テスト スコープの設定 for an example.
Example Data File Object
Code Block |
---|
{ "type": "classpath_project", "name": "project_name", "location" "/absolute/path/to/project", "compilations": [ { "sourcepath": [ "/absolute/path/to/srcdir1" ], "classpath": [ "/absolute/path/to/classdir1", "/absolute/path/to/buildfile.jar" ], "bootpath": [ "absolute/path/to/java/ajavalib.jar" ], "encoding": "project_encoding_name", "sourcelevel" "project_source_level" },{ ... } ] } { ... } |
Displaying Detailed Progress Information
Use the -showdetails
switch to display detailed progress information:
Code Block |
---|
-showdetails |
Alternatively, you can configure showing detailed information by setting the console.verbosity
option to high
:
Code Block |
---|
console.verbosity.level=high |
Ant and Maven Pattern
If you use Ant or Maven, use the following pattern:
Code Block |
---|
<showdetails>true</showdetails> |
About Error Codes
Jtest returns error exit codes (other than 0) when the following occurs:
- Jtest is executed without a license.
- A test process exits with an internal exception.
- Command-line is malformed or refers to a resource that does not exist. See Configuring the Test Scope テスト スコープの設定.
You can also use the -fail
option to generate an exit code when the analysis reports static analysis findings.
...