How to run whole test suite with RobotFramework in several browsers at the same time through one command line in terminal?

StackOverflow https://stackoverflow.com/questions/22706015

How to run whole test suite in different browsers at the same time?

有帮助吗?

解决方案

Robot framework isn't designed to open several different browsers at the same time, or to run tests in parallel. If you want to test on five browsers, for example, the simplest solution is to run robot five times. You can do this with a powershell or bash script, or configure your continuous integration server to do it for you.

If you put the browser in a variable, you can set the value on the command line so that you don't have to modify your suites for each run.

For example, open the browser like this:

*** Settings ***
| Suite Setup | Open Browser | ${ROOT} | browser=${BROWSER}

You could then create a script to run robot multiple times like this:

pybot --variable BROWSER:ff mysuite.txt
pybot --variable BROWSER:chrome mysuite.txt
pybot --variable BROWSER:safari mysuite.txt
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top