...
Usage | Description |
---|---|
-include com/** | Tests everything in packages that begin with "com". |
-include path:**/Bank.java | Tests 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 |
-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
optionYou can use the -project.*
switch to create a project file, which contains necessary information about executing Jtest Use the -projec
t switch when the solution is not provided. The switch can be used multiple times to analyze many projects. ANT-style wildcards are also supported, as well as paths to *.lst
files. The following table describes the parameters for using -project
switches.
Parameter | Description |
---|---|
-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.name | Sets the project name. |
-project.encoding | Sets the encoding of the project. |
-project.sourcepath | Sets the source of project. Use this option multiple times to specify multiple source folders. |
-project.sourcelevel | Specifies the Java compiler compliance level. |
-project.classpath | Specifies the classpath. |
-project.javahome | Used to find and add the library to the bootclasspath |
-project.classpath.jars.dir | Specifies 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.outcomes | Specifies 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. |
...