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.

SOAtest run as a project or tst file

Options
jngojngo
jngojngo Posts: 46
edited December 2018 in SOAtest

Is there a way for Soa test to determine whether you are running it as a project folder that includes all. .tst file or a single .tst file. The reason for asking this is that I would like to set a common value that will exist on all .tst file if it’s run as on project folder and a different value set when it run on a .tst file.

Comments

  • jakubiak
    jakubiak Posts: 798 admin
    Options

    There is no way for you to interrogate SOAtest to distinguish between the two cases. But you could do something like pass a system property on the command line that you set to different values depending on whether you are running a single .tst or a folder of .tst files - and then you could add a script within your .tst files to read the value of the system property and do something like set a SOAtest test variable.

  • jngojngo
    jngojngo Posts: 46
    Options

    Can you point me to the right direction. As I couldn't see the system properties in the soatestcli command line usage.

  • jakubiak
    jakubiak Posts: 798 admin
    Options

    You pass a system property to soatestcli by passing an argument that looks like this:
    -J-Dmy.system.property="myvalue"
    Then you can read that system property within a script by using the following Java code:
    java.lang.System.getProperty("my.system.property")