Running the same test suite in parallel with Pabot

Hi. I have a test suite that creates a new account in application and saves account data to new json file. I’d like to run the script to create a few accounts simultaneously.
I tried ‘pabot --processes 5 tests/create_new_account.robot’, but it runs the test suite only once.

Hi Tom,

That’s correct, Pabot will only run the suite once and will only run each test once.

As per the documentation ( Command-line options ): --processes is used to control how many test cases run in parallel

if you have 10 test cases and run with --processes 5 5 of those 10 test cases will start running and as one finishes another will start until all 10 have started, the total elapsed time for the 10 cases with 5 parallel, should be around the time that 2 would have taken running sequentially.

If you only have 1 test case and run with --processes 5, it will be exactly the same as if you didn’t use pabot as you only have 1 test case so there are no other tests to run in parallel.

Without knowing what’s in your create_new_account.robot, it’s hard to say much more, but I’ll suggest you start with a keyword for creating a new account that takes arguments such as username, password, and optionally user groups. Then create a separate test case for each user you want created, Data-driven style Test templates might be useful for this.

Dave.

1 Like