Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

UsageDescription
-include com/**Tests everything in packages that begin with "com".
-include path:**/Bank.javaTests only Bank.java files
-include path:C:/Project/src/**Tests all subfiles and subdirectories of C:/Project/src
-include path:C:/Project/src/*Tests all files in C:/Project/src, but not subdirectories
-include c:/include.lst

Tests all files listed in include.lst. Each line is treated as a single pattern.
Example:
If include.lst contains the following lines:
**/*Account
path:**/Bank.java
It has the same effect as the following command:
-include **/*Account
-include path: **/Bank.java

-exclude **/internal/**Tests everything except classes that have "internal" as part of the package name.

Creating

...

Custom .json Data Files

In typical scenarions, Jtest runs on jtest.data.json data files that are automatically generated by build system plugins. Alternatively, you can manually create a .json file and provide Jtest with the path to that file using the -data command line option (see Running Static Analysis 1).

To manually create a data file Jtest will use for analysis, run jtestcli with the -project options. The available options are listed in the table below.

The example.data.json file is created in the root of the project configured with the -project.location option.


ParameterDescription
-project.location

Required. Enables generation of

a file and indicates where the file will be placed after generation. All other -project.* options are ignored if the -project.location option is not set. 

the .json file by specifying the root of the project.

Provide the absolute path to an existing directory. For example:

-project.location /home/adam/projects/myproject1

(info) All paths included in the Jtest report generated after analysis will be relative to the root of the project configured with this option.

-project.nameSets the project name.
-project.encodingSets the encoding of the project.
-project.sourcepathSets the source of project. Use this option multiple times to specify multiple source folders.
-project.sourcelevelSpecifies the Java compiler compliance level.
-project.classpathSpecifies the classpath.
-project.javahomeUsed to find and add the library to the bootclasspath
-project.classpath.jars.dirSpecifies the path to the directory with jars that should be appended to the project classpath. View the json file to verify the order of the jars and ensure it meets your project requirements.
-project.junit.outcomesSpecifies the path to the XML file with JUnit test results that will be used to generate a report. Use this option multiple times to specify multiple report files.
-project.compilation.classes   Specifies the path to the compiled project classes that will be used to generate metadata information required to perform the "Calculate Application Coverage" configuration.

...