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.

Command Line Script

Options
reactancexl
reactancexl Posts: 160

I have a project that has 3 tests underneath it that I want to run using command line in a batch file. I want to run all three of the tests on one command line script. Do I run the command three times, one for each .tst file or can I run it at the project level? When I open the SOATest 9.10 GUI I am able to run it at project level which executes all three tests. That is the behaviour I want it to act from command line. thx

Comments

  • jakubiak
    jakubiak Posts: 798 admin
    Options

    Assuming you have all your .tst files in a project named "MyProject", you can tell SOAtest to run them all by specifying "-data /MyProject". SOAtest will then run all .tst files that are within the MyProject project.

  • reactancexl
    reactancexl Posts: 160
    Options

    wow, that was easy. I was overthinking it a little :) . thx

  • benken_parasoft
    benken_parasoft Posts: 1,231 ✭✭✭
    edited June 2017
    Options

    "-data" is how you configure the path of the workspace, not a project in the workspace. By default all tst files in the provided workspace will be executed. If you need to do additional filtering based on resource paths in the workspace, then you can pass one more more -resource arguments. If you need to do additional filtering of those resource paths, then you can pass one or more -include, and -exclude arguments.
    For example:

    soatestcli -data "c:\my_workspace" -config "soatest.builtin://Demo Configuration"
    soatestcli -data "c:\my_workspace" -resource /MyProject -config "soatest.builtin://Demo Configuration"
    soatestcli -data "c:\my_workspace" -resource /MyProject -include **/good_tests/** -exclude **/bad_tests/** -config "soatest.builtin://Demo Configuration" 
    
  • jakubiak
    jakubiak Posts: 798 admin
    Options

    Thanks Joe - I was thinking -resource but wrote -data. Thanks for clearing that up.

  • atulsharma1989
    atulsharma1989 Posts: 5
    Options

    what is mean of :env.preferences not registered in soatestcli on Linux OS

  • Ireneusz Szmigiel
    Ireneusz Szmigiel Posts: 227 ✭✭✭
    edited July 2017
    Options

    atulsharma1989

    it's message when user trying to import test in to new workspace using command line.
    Test should be imported and you should be able to run test using cli.
    If you want to get rid of this error, upgrade SOAtest to latest version.