Reusing test suites in Pabot

Hi. I have two scenarios and test suites 1- 4 that I run with commands:

robot tests1.robot tests3.robot tests4.robot
robot tests2.robot tests3.robot tests4.robot

I wanted to run the scenarios simultaneously using pabot with command:
pabot --processes 2 --ordering order.txt tests1.robot tests2.robot tests3.robot tests4.robot

and order.txt file

{
--suite Suites.Tests1
--suite Suites.Tests3
--suite Suites.Tests4
}
{
--suite Suites.Tests2
--suite Suites.Tests3
--suite Suites.Tests4
}

After that scenario1 run tests1, tests3, tests4 sequentially as I wanted, but scenario2 run only tests2.
How to run the scenarios as I described?

Hi Tom,

  • I’m guessing you already tried putting tests3.robot and tests4.robot in the order.txt file twice?
  • The easiest way would be to put the test cases in 2 suite files, test 1, 3,& 4 in file 1 and 2, 3, & 4 in file 2, then use --testlevelsplit suites
  • another option might be to add tags to the test cases, e.g. tag test 1, 3,& 4 with tag1 and tag 2, 3, & 4 with tag2, so tests 1 & 2 will have 1 tag and 3 &4 will have 2 tags. then use --argumentfile[INTEGER] where --argumentfile1 file contains -i tag1 and --argumentfile2 file contains -i tag2 (I’ve never tried this but based on the doco that’s how I think it works, may require some tuning)

Hopefully this helps,

Dave.

1 Like

Thanks for your answer.
It helped to put tests3.robot and tests4.robot twice in run command.

1 Like