0

for our End-to-End-Tests, we want to set up a distributed testing environment. That means, that we want a docker hub container, that distributes tests of a test suit by the first in, first serve way to it's docker container workers.

How can we achieve that in Robot Framework. For a better example of what we want to implement, here a short illustration: enter image description here

Thank you very much!

Faram
  • 525
  • 6
  • 21
  • Is it selenium tests? – JaPyR Oct 01 '18 at 11:16
  • Yeah. It's with the Robot Framework – Faram Oct 01 '18 at 12:02
  • 1
    Take a look at https://github.com/aerokube/ggr and https://github.com/aerokube/selenoid – JaPyR Oct 01 '18 at 12:05
  • Okay, I should clarify: It's not only Selenium, but also Selenium. That's why this wont work. – Faram Oct 01 '18 at 12:30
  • 2
    Have you had a look at [pabot](https://github.com/mkorpela/pabot)? It will allow for the parallel execution of suites. It can connect to an external host, but I don't see that it can execute a set of suites accross several external pabot servers. – A. Kootstra Oct 01 '18 at 13:50

1 Answers1

1

Following up on @A.Kootstra's Comment.

Pybot allows us to run parrallel execution of suites.

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

  • In general case you can't count on tests that haven't designed to be executed parallely to work out of the box when executing parallely. For example if the tests manipulate or use the same data, you might get yourself in trouble (one test suite logs in to the system while another logs the same session out etc.). PabotLib can help you solve these problems of concurrency.

Example:

test.robot

  *** Settings ***
  Library    pabot.PabotLib

 *** Test Case ***


Testing PabotLib
    Acquire Lock   MyLock
    Log   This part is critical section
    Release Lock   MyLock
    ${valuesetname}=    Acquire Value Set
    ${host}=   Get Value From Set   host
    ${username}=     Get Value From Set   username
    ${password}=     Get Value From Set   password
    Log   Do something with the values (for example access host with username and password)
    Release Value Set
    Log   After value set release others can obtain the variable values

valueset.dat

  [Server1]
  HOST=123.123.123.123
  USERNAME=user1
  PASSWORD=password1

  [Server2]
  HOST=121.121.121.121
  USERNAME=user2
  PASSWORD=password2

pabot call

 pabot --pabotlib --resourcefile valueset.dat test.robot

You can find more info here https://github.com/mkorpela/pabot

AutoTester213
  • 2,714
  • 2
  • 24
  • 48