简体   繁体   中英

How to run robot framework test cases parallel and not Test Suite parallel?

I'm trying to run my test case from different suites in parallel using the command

pabot --verbose --processes 3 --variable --variable url:http://xxxxxxxxx:8080  --include Sanity --output original.xml --randomize all TestCases

There are two findings while execution:

  1. The suites are executed parallel and not the test case. ie if there are two suite A and B , if A take 30 mins to complete and B takes 5 mins to complete, the total execution time is 30 mins, simply because each processes pick each suite and not test cases How can i run the test cases parallel and not the Suite parallel ?
  2. It creates outputdir separately for each Test Suite pabot_results\\TestCases that makes my rerunning of failed test cases difficult. How to get a single output.xml file all the suite execution ?

I use the below library

robotframework-pabot==0.53
robotframework-seleniumlibrary==3.3.1

First point: If you read the GitHub readme page , in the "Things you should know", it states:

Pabot will split test execution from suite files and not from individual test level.

So there is nothing to do on test level, except if you help develop the tool so it becomes possible to launch testcases in parallel.

Second point: Use rebot . You can merge multiple test execution reports by using the command:

rebot --merge output1.xml output2.xml

This will generate only html report. To obtain a merged output.xml file, just add an -o output.xml in the arguments, like this:

rebot -o output.xml --merge output1.xml output2.xml

Now (after version 0.57) you can do this with

pabot --testlevelsplit [path to tests]

official link for more info https://github.com/mkorpela/pabot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM