Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Unable to run jtest cli on cmd

Options
NZJ
NZJ Posts: 3

Hi all, I have an issue with trying to get jtest cli to run on cmd

I am able to get this version to be running on eclipse IDE

This is the following commands that i have attempted to run on cmd:

jtestcli.exe -localsettings -resource "ProjectA\src" -config "buildin://Recommended Rules" -data

It will show that the testing scope is missing

Further more information about the project i am testing for:
1. The project doesnt use gradle or maven
2. The project will be using ant to compile if there is a need

Parasoft version: Jtest 2023.1

Any help would be appreciated, thanks for you time

Best Answer

  • Tomasz
    Tomasz Posts: 20
    Answer ✓
    Options

    Try to use jtest.data.json generated by the IDE.
    1) Enable TechSupport package: menu Parasoft > Preferences > Tech Support > "Enable" (check)
    2) Run static analysis on the project
    3) menu Parasoft > Preferences > Tech Support > Explore Archives - file "TechnicalSupport_CLI.zip

    Unzip and use jtest/jtest.data.json as a -data input.

Answers

  • Tomasz
    Tomasz Posts: 20
    Options

    Hi NZJ

    First you can try to run the jtestcli without limiting the scope (-resource switch) - just to confirm that -data points to propert json file. Json file is automatically created by the IDE or gradle/maven plugins but you can also create it manually using options described at manual - see https://docs.parasoft.com/display/JTEST20231/Command+Line+Options#CommandLineOptions-creating_jsonCreatingaCustomJSON

    When you confirm that json is correct and jtest is processing it (shows the summary information ie. about tested files) please try to apply -resource filter. You can also verify if json contains project definition which is used in this filter.

  • NZJ
    NZJ Posts: 3
    Options

    Hi Tomasz,

    I have attempted to manually buld a json file since we do not use maven/gradle plugins

    Running the command jtestcli.exe -localsettings -config "buildin://Recommended Rules" -data build.json with a json file that has the following

    { "project.location":"<Main project folder>", "project.jsonpath":"<Main project folder/project.json>", "project.name":"<Project name>", "project.encoding":"UTF-8", "project.sourcepath":"<Main project folder/src>", "project.sourcelevel":1.8, "project.javahome":"C:/Program Files/Java/jdk-17.0.1" }

    It will still show that the Testing scope is still empty

    Regards