How to do appium parallel execution in robot framework

Is it possible to do appium parallel execution in robot framework?

1 Like

Yes @rasjani i tried you shared link. i executed “./run-test.sh calculator 2” in pycharm terminal its not executed. for you its working?

“It didn’t work” is not helpful at all. Maybe share what sort of errors you get or what did you expect to happen and it did not ?

1 Like

I got calculator script in github and run the run-test.sh in pycharm IDE doesn’t throw error message also just it moved to new line below i have attached my screenshots

I’m using windows

That script is intended for Bash shell and your pycharm looks its Powershell (?)

Bash scripts typically are intended for for Mac & Linux but of course there’s bash in Windows too (it is bundled with git for windows).

Point why I shared that repo is that it highlights how to do things, not a place where you can just copy paste the code off from as part of the test automation should also be to understand what you are doing if things are failing because of your efforts and not because there’s issues with the system you test. Even that repo’s README states following;

This sample is provided as-is at bare minimum just to give you idea how to do parallel Appium test on Robot Framework.

That said; that particular bash script does this;

On this line, only “PABOT_PORT” is decided by the script itself but you can pick any free port from your system and thus, all this should hint that all you need is pabot to run your tests in parallel and rest of the stuff is on TestSetup.

1 Like

ok, I’m did the script in below format
*** Settings ***
Library AppiumLibrary timeout=30 run_on_failure=No Operation
Library OperatingSystem
Library String
Library Collections
Library Process
Library pabot.PabotLib

*** Variables ***
${device1} 3dab36b1122
${device2} emulator-5554
${system-port1} 8201
${system-port2} 8202
${app-port1} 4723
${app-port2} 4724

*** Test Cases ***
Validate Availability
[Template] Open URL
${device1} ${system-port1} ${app-port1}
${device2} ${system-port2} ${app-port2}

*** Keywords ***
Open URL
[Arguments] ${device} ${system-port} ${app-port}
Open Application
http://127.0.0.1:${app-port}/wd/hub
… platformName=Android
… appPackage=com.google.android.calculator
… appActivity=com.android.calculator2.Calculator
# … deviceName=emulator
… noReset=false
… udid=${device}
… systemPort=${system-port}
… automationName=uiautomator2
… newCommandTimeout=10000

Its run sequentially only not in parallel. This is the command i used to run the script "pabot --pabotlib “Testsuites.robot”. Can help me what mistake i made in this script or command execution?

By default, pabot does suite level split when it runs your tests in parallel. In your example, you only have one suite so those cases gets executed in series. To run each testcase in parallel, you need to pass additional argument --testlevelsplit to pabot.

I suggest also to read the “readme” @ GitHub - mkorpela/pabot: Parallel executor for Robot Framework test cases.