Parallel Execution Using Robot Framework – DevstringxDeepali Sharma
In this blog, you will learn how to execute two different robot classes parallelly. With the help of parallel execution, you can save test execution time. In this example, I am demonstrating how to run two different robot classes in parallel.
Task: Execute 2 different Robot Classes/All classes in a directory parallelly.
- First, you need to install Pabot.
For installing Pabot you need to follow the following steps:
- a) Open the command prompt.
- b) Type>pip install -U robotframework-pabot
2. Open the editor (e.g., PyCharm) you are using for the robot framework and add a library in all classes which you want to run parallelly.
Note: Here I am using PyCharm as an editor.
- Here are the following ways to execute the suites parallelly.
- a) If you want to run two different robot classes parallelly then type the following command in PyCharm and press enter:
Note: Here are test cases in the directory where I have kept my robot classes and AdvancedFilter and BulkImport are the names of two different robot classes which I want to run parallelly.
- b) If you want to run all the test cases of a particular directory in parallel then type “pabot testcases/” command in PyCharm and press enter.
Read Also:- Parallel Execution In Selenium Using TestNG
Result: You can see the total time of execution and time you saved while running the robot class parallelly once the execution will finish. Elapsed Time is the amount of time that passes from the start of an event to its finish. So here we have saved around 2 mins from the expected execution time.