4

I have prepared a robot test script and now I'm trying to run the script in multiple browsers ( same time ) using Blazemeter - Taurus. The Tauyus yml file looks like the code bellow.

I have used the same method in JMeter and Taurus seems to run smoothly with Jmeter as expected.

execution:
- concurrency: 5
 executor: selenium
 runner: robot
 ramp-up: 50s
 hold-for: 2h
 scenario:
 script: WebFlow.robot

reporting:
 - console
 - final-stats
 - blazemeter

I'm expecting to start 5 browser windows and run the robot script concurrently. But now even the concurrency is 5 it will open browsers one at a time and once the whole robot script finished running it will start the browser for the second time.

Muditha Perera
  • 1,216
  • 8
  • 24
  • I too, tried the same but no concurrency. I even installed `locust` but it did not change. At least you are not alone :( – Helio Feb 07 '19 at 21:58
  • That's the problem I believe it's an issue with Taurus and Robot hopefully it'll get fixed soon – Muditha Perera Feb 08 '19 at 02:32
  • Had a look around and some of the selenium type tests allow for concurrency, but none of the Robot ones have that option as an example. I'd go back to Taurus project for more clarity. – A. Kootstra Feb 08 '19 at 06:39
  • Thank you very much. The solution I found was with pabot. It will allow you to run concurrent browsers and at the same time, we need to loop the tests within the test cases. It'll do the job but then again we are missing the Taurus reports, so it's better if it can be fixed with Taurus. – Muditha Perera Feb 08 '19 at 10:48

2 Answers2

1

In Taurus you can easily create multiple execution instances which will be parallel for robot scripts and will aggregate results into single report as expected. For example:

execution:
- executor: robot
  concurrency: 1
  iterations: 5
  scenario:
    script: /tools/robot/phx-read-1.robot
- executor: robot
  concurrency: 1
  iterations: 5
  scenario:
    script: /tools/robot/phx-read-2.robot
- executor: robot
  concurrency: 1
  iterations: 5
  scenario:
    script: /tools/robot/phx-read-3.robot
- executor: robot
  concurrency: 1
  iterations: 5
  scenario:
    script: /tools/robot/phx-read-4.robot
- executor: robot
  concurrency: 1
  iterations: 5
  scenario:
    script: /tools/robot/phx-read-5.robot

reporting:
  - console
  - final-stats
  - blazemeter

Yes, you have to specify it many times... but easily scriptable. In my case I actually have to have different scripts anyway, but Taurus nicely aggregates everything.

Zvyezdan
  • 11
  • 3
0

I would recommend checking out the pabot library for robot. I have used it before for running tests in parallel and it worked great.

A parallel executor for Robot Framework tests. With Pabot you can split one execution into multiple and save test execution time.

cullzie
  • 2,705
  • 2
  • 16
  • 21
  • I tried pabot. The issue is we can't control the concurrence instances. If I want to run my testcase (Test.robot) 10 times I have to repeat it 10 times as 10 files and use pabot. It will run as a parallel execution but it'll be only one cycle. What i want is to run Test.robot with 10 parallel execution with 5 cycles. ( Just like 10 users and 5 loops in jmeter ) – Muditha Perera Feb 08 '19 at 02:35
  • 1
    @MudithaPerera So wouldn't it work for you to specify in pabot CLI the same suite file 10 times, and have that command looped 5 times? Thus you'll have 10 parallel runs, for 5 times. The only difference is there's not going to be runs cross-loops overlapping - one cycle will wait for the last run in it to finish, before the next one starts, but that is pretty much it? – Todor Minakov Feb 08 '19 at 07:29
  • Yes, exactly that's the solution I found. we can loop the test case and use pabot to run the browser instances. But in Taurus it's given as a direct feature, unfortunately It's not 100% accurate for Robot. Thank you very much for the information – Muditha Perera Feb 08 '19 at 10:42