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.

Execution Sequence

rvmseng
rvmseng Posts: 89

Hi every body,

how can I change execution sequence for ".tst" files in "Test Configuration" settings?

For example, I want to run Test4, Test2 and Test3 with this order but SOATest run them in following order.

Test2.tst
Test3.tst
Test4.tst
.
BR.

Comments

  • OmarR
    OmarR Posts: 233 admin
    edited June 2018

    Good morning,

    Tests will be run in sequential order by default. Is there a particular issue in simply re-ordering your tests? Whats your use case?

  • rvmseng
    rvmseng Posts: 89

    Dear omaR,

    please notice I mentioned ".tst" files not test steps.

  • OmarR
    OmarR Posts: 233 admin

    ohh I see. The .tst files in a project are organized alphabetically. Similarly, they will run in sequential order by default.

    You may achieve your goal by creating a sub-folder under your project folder and placing your set-up tests there. The .tst files in the sub-folder should execute prior to the rest of your .tst files in the project folder.

  • rvmseng
    rvmseng Posts: 89
    edited June 2018

    Dear omaR,

    Is there any solution for this issue with test configuration setting?

    I can not solve it with sub folder , because I have to create many folders.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited June 2018

    You could create a new tst file that references the other ones as referenced test suites. You can add referenced test suites into this "master" tst file in any order you like, similar to adding a normal test suite. Then you would just only run this "master" tst.

    See Reusing and Modularizing Test Suites for End-to-end Testing > Using Test Suite References

  • rvmseng
    rvmseng Posts: 89
    edited June 2018

    Thank you for your reply.

    but I want to execute tests without any change in my ".tst" files and without create dummy ".tst" files, I was hope that test configuration has a config for specify run order.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited June 2018

    but I want to execute tests without any change in my ".tst" files and without create dummy ".tst" files

    I know. I just highly recommend against trying to do what you are asking. :) It is less confusing to do one of the two things previously mentioned, either name your tests so they are listed in desired execution order, or create "master" tst that references others in the desired order.

    From test config, you can only specify include/exclude patterns in the scope options, not a specific list of tests is some special order. However, there is only one option I am aware of that you can only do from the command line. From soatestcli, you can pass multiple "-resource" arguments. The tests you specify should be run in the order you list on the command line. For example, -resource /ExecutionOrder/Test4.tst -resource /ExecutionOrder/Test2.tst -resource /ExecutionOrder/Test3.tst"

  • rvmseng
    rvmseng Posts: 89

    thank you benken.

    last solution is better.