Poorna Dinesh Acharya
Poorna Dinesh Acharya

Reputation: 11

How to set priority of test cases in RIDE

I have test cases in a test suite like below example:

MyTestSuite:

TC_01:
     Log to console **This should execute last** 

TC_02:
     Log to console **This should execute first**

TC_03:
     Log to console **This should execute second**

I have tried adding the ordering for the test cases like below :

01__TC_01:
     Log to console **This should execute last** 

02__TC_02:
     Log to console **This should execute first**

03__TC_03:
     Log to console **This should execute second**

I referred the below site:

https://seleniummaster.com/sitecontent/index.php/selenium-robot-framework-menu/selenium-robot-framework-python-menu/222-run-tests-in-certain-order-in-robot-framework-python

But still they run in the same order in which they are written.

Please guide me through this.

Thanks in advance!

Upvotes: 0

Views: 1403

Answers (1)

Bryan Oakley
Bryan Oakley

Reputation: 385940

Robot test cases will run in the order they appear in the file. Using names only affects the order that files within a folder are run. The only exception is if you use the --randomize option.

The robot framework user guide says this:

Test cases in a test suite are executed in the same order as they are defined in the test case file.

For more information see the section Test Execution in the robot framework user guide.

Upvotes: 1

Related Questions