Execution Sequence

rvmsengrvmseng Posts: 52

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

  • OmarROmarR Posts: 204 admin
    edited June 20

    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?

  • rvmsengrvmseng Posts: 52

    Dear omaR,

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

  • OmarROmarR Posts: 204 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.

  • rvmsengrvmseng Posts: 52
    edited June 21

    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_parasoftbenken_parasoft Posts: 453 ✭✭✭
    edited June 21

    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

  • rvmsengrvmseng Posts: 52
    edited June 21

    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_parasoftbenken_parasoft Posts: 453 ✭✭✭
    edited June 21

    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"

  • rvmsengrvmseng Posts: 52

    thank you benken.

    last solution is better.

Sign In or Register to comment.