In this section:

How can I get quick access to information about usage on the command line?

Use the -help command line switch:

jtestcli.exe -help

What if some characters fail to be properly displayed in Jtest reports?

Reports generated by Parasoft products require a sans-serif font to be available in your environment. If your report fails to correctly display some characters, such as national characters, ensure that a sans-serif font is installed on your system.

How can I prevent my machine ID from floating?

Changes in the network environment may affect the interface that is used to compute your machine ID and result in machine ID instability. You can use the PARASOFT_SUPPORT_NET_INTERFACES environment variable to specify a stable interface and prevent the machine ID from floating.

  1. Set up the PARASOFT_SUPPORT_NET_INTERFACES environment variable.
  2. Set the variable value to a stable Ethernet network interface. Do not use virtual, temporary or loopback interfaces. 
    - On Windows: Set the value to the MAC address of your network card. You can use the ipconfig -all command to obtain the address.  For example:

    SET PARASOFT_SUPPORT_NET_INTERFACES=00-10-D9-27-AC-85

    - On Linux: Set the value to one of the network interfaces from the "inet" or "inet6" family. You can use the ifconfig command to obtain the list of available interfaces. For example: 

    export PARASOFT_SUPPORT_NET_INTERFACES=eth1

If the problem persists, you can obtain diagnostic information by setting up the environment variable PARASOFT_DEBUG_NET_INTERFACES and setting its value to true. This will print to the standard output the checking procedure that can be shared with technical support, as well as the interface that is used to compute your machine ID. The interface will be marked with the [SELECTED] prefix.

What if Jtest reports compilation problems when building the project with Maven?

If Jtest reports compilation problems related to importing dependencies in the Maven test scope, try running the jtest:jtest goal with the mvn test command:

mvn test jtest:jtest

Why does running the jtest:coverage goal (Maven) or jtest-coverage task (Gradle) fail the build?

The Jtest coverage goal/task was dropped with release 10.2.2 (plugin version 1.2.4) and is no longer available (see Migration From 10.x to 10.2.2 or later). Executing this goal fails the build with the following messages:

[ERROR] Could not find goal 'coverage' in plugin com.parasoft.jtest:jtest-maven-plugin. (Maven)

Task 'jtest-coverage' not found (Gradle)

What if Jtest cannot collect coverage information for tests run with Gradle?

To enable collecting coverage, Jtest automatically configures the JVM arguments for the Jtest coverage agent. Overriding these arguments prevents Jtest from collecting coverage data. If your Gradle build script modifies JVM arguments, ensure they are added (+=) to other JVM arguments to prevent overriding:

(error) jvmArgs = [
'--module-path', classpath.asPath,
'--add-modules', 'ALL-MODULE-PATH',
'--add-reads', "$moduleName=junit",
'--patch-module', "$moduleName=" + files(sourceSets.test.java.outputDir).asPath

]

(tick) jvmArgs += [
'--module-path', classpath.asPath,
'--add-modules', 'ALL-MODULE-PATH',
'--add-reads', "$moduleName=junit",
'--patch-module', "$moduleName=" + files(sourceSets.test.java.outputDir).asPath

]

What if Jtest cannot resolve required dependencies while running analysis or executing tests with Maven?

To ensure that all of the required dependencies are resolved, you may need to enable resolving transitive dependencies by adding the following option to your command line:

-Djtest.resolve.transitive=true

Why are the issue tracking tags not available in the report after I run Jtest with Maven?

Your report may not include the issue tracking tags you have configured (see Associating Tests with Development Artifacts) if Jtest is unable to resolve one or more required dependencies. To prevent this, see What if Jtest cannot resolve required dependencies while running analysis or executing tests with Maven?.

Why does test execution fail when the path to UTA files exceeds 250 characters?

On Windows, a file path longer than 250 characters may prevent accessing the file. If your workspace is deeply nested in the folder structure, the path to some UTA files may exceed 250 characters. If the files that are key to test execution cannot be accessed, test execution fails.

To ensure that the path to the UTA files does not exceed the limit, you may consider moving your workspace folder higher in the folder hierarchy.

What if tests fail to execute in IntelliJ IDEA?

IntelliJ versions earlier than 2017.3 do not have full support for JUnit 5. As a result, tests may fail to execute if JUnit 5 dependencies are included in your project, for example, by adding the Unit Test Assistant Library container (see Automatically Adding the Required Libraries). In such a case, you may need to manually remove JUnit 5 libraries or upgrade your IDE.

How can I work with Jtest via proxy?

Typically, if you connect through a proxy server, you need to configure the connection by passing protocol-specific system properties to the JVM – using the -D command line option.

To work with Jtest, ensure that the system properties for the HTTPS protocol are configured. At a minimum, you must configure https.proxySet=true, https.proxyHost=[hostname], and https.proxyPort=[port number]. If your proxy server requires authentication, you can configure your credentials with the https.proxyUser and https.proxyPassword properties.

Your command line may resemble the following:

java -Dhttps.proxySet=true -Dhttps.proxyHost=myserver.example.com -Dhttps.proxyPort=8080 -Dhttps.proxyUser=user1 -Dhttps.proxyPassword=MyPassword

In addition, you can configure the https.nonProxyHosts property to specify hosts where connection via proxy is not required.(info) If you use Jtest on desktop with Eclipse or IntelliJ IDEA, the proxy settings are automatically detected and do not need to be configured in the command line.

What if the static analysis performance decreased after Jtest was updated to a newer version?

The new version of Jtest may require more memory to run static analysis. You can increase memory allocation by configuring the -Xmx option in the [INSTALL_DIR]/etc/jtestcli.jvm configuration file.



  • No labels