Deepti K
Deepti K

Reputation: 599

Is there any way to run robot framework test suites in parallel?

I have 5 test suites which are independent of each other. I have to run it against the same environment. Most of my test suites consist of API calls. The test cases inside the suites should run in sequence as they are dependent on each other.

Is there any way we can run all the test suites in parallel via the pybot command?

Upvotes: 8

Views: 9455

Answers (4)

Bing
Bing

Reputation: 378

The simple solution is using Jekins:

  1. You could install Jeknins with robotframework plugin.You can have two job run in parallel by default without any slave node.
  2. Or you have have multiple slave node, then using tag in robot and node label to distribute job.

Just set the parameter in Jenkins job build section, such as:

  1. pybot --include tag1 test.robot for job1
  2. then set pybot --include tag2 test.robot for job2.

Then trigger upstream job. you will get them running in parallel.

But still you need to make sure the file you accesing is locked by one of the testing job.

Upvotes: 0

Sisyphus
Sisyphus

Reputation: 328

When the tests are completely stand-alone and can run completely parallel I have had some success with just writing an execution script that iterates through all the IP addresses of the units on which I would want to run a test in parallel and then calling the test with that IP address as an argument. I also tell it to only create the output.xml files, naming them based on the hostname or IP address, and then the scrip does post-processing with rebot which creates an aggregated report with all the units.

Upvotes: 0

Laurent Bristiel
Laurent Bristiel

Reputation: 6935

There is no native handling of parallel executions of tests in Robot Framework. There is Pabot, a parallel executor for RF. Pabot allows test suite distribution and makes a combined report and log.

Upvotes: 11

Bruno Bossola
Bruno Bossola

Reputation: 1378

We also at Workshare had our take on the matter (at the time we did not know about Mikko work) and we recently open sourced it. It's now production level, as we use it to launch in parallel our tests on our CI (jenkins). It can produce a complete final report, it can rerun failed tests, it has a global setup/teardown mechanism, it generates xunit compatibles result files, and it also works on Windows :) (altough Linux is a better option!)

You find it at: https://github.com/workshare/parallel_pybot

Upvotes: 3

Related Questions