Not able to run parallel instances of chrome using robot framework

Hi Team,

I have automated script in robot for chrome browser. I have to run my robot script which is my single test case parallelly on multiple instances of chrome.

I tried below command but its not launching multiple instances of chrome. Its just launching single instance

pabot --processes 2 --listener robot-tc-listener --outputdir %PabotResu
lts_DIR% --output output.xml --report report.html --log log.html testfile.robot

So Pabot by default splits up execution by suite level. So for example if you had a directory called “tests” that contained 4 robot files and you ran the command with that “tests” directory as the path then you would run two of those robot files at once.

What I think you need is to use the command --testlevelsplit that will run your tests within a suite in parallel.

From GitHub - mkorpela/pabot: Parallel executor for Robot Framework test cases.

–testlevelsplit
Split execution on test level instead of default suite level. If .pabotsuitenames contains both tests and suites then this will only affect new suites and split only them. Leaving this flag out when both suites and tests in .pabotsuitenames file will also only affect new suites and add them as suite files.

@Wolfe1

I have single automated long test case in my suite. I have tried below two commands to launch 3 separate instances but it is just launching single chrome instance.

1.pabot --processes 3 --testlevelsplit test.robot

  1. pabot --processes 2 --listener robot-tc-listener --outputdir %PabotRes
    ults_DIR% --output output.xml --report report.html --log log.html test.robot

Also tried below command -
pabot --argumentfile1 test1.txt --argumentfile2 test2.txt test.robot

Execution failed in Test Script {test1.txt} with 252 failing test(s)
Execution failed in Test Script {test2.txt} with 252 failing test(s)

I want to execute same test case with different input file parallelly. It should launch multiple instances of chrome and pass every single file to script

How to execute one test case multiple time in parallel in Robot framework?

I have single automated long test case in my suite. I want to execute same test case with different input file parallelly. It should launch multiple instances of chrome and pass every single file to the robot script. Its basically not suite level split .I have to launch only one test case on multiple instances of chrome.

I have tried multiple thing. e.g. pabot but did not worked

  1. Launching just single chorme
    pabot --processes 2 --listener robot-tc-listener --outputdir %PabotResu
    lts_DIR% --output output.xml --report report.html --log log.html test.robot

2.Launching single test case sequncially 3 times
pabot --processes 8 -d results -o Output.xml -t “Test-Task” . . .
3. Launching just single chorme
pabot --processes 8 -d results -o Output.xml test.robot --include smoke
4.Launching just single chorme
robot -t “Test-Task” …
5.Launching just single chorme
pabot --processes 3 --testlevelsplit test.robot

My Script looks as below-
Test-Task
[Tags] smoke
Launch Application
Select link to register
Upload text file ${data_file_path}

I understood pabot split execution on test case level.

Any help would be highly appreciated, Thanks

Looks like its limitation of robot framework. It is just launching 2 chrome instances parallelly
pabot -d results -t “*Test-Task” . . . . test.robot

Ideally for each dots each should launch new instance of chrome.

If you are using different input files for each run then you may be able to do this with argument files in pabot as per https://groups.google.com/g/robotframework-users/c/aaVh77m-95Y

pabot command-line-options

–argumentfile[INTEGER] [FILEPATH]

“Run same suites with multiple argumentfile options.”

@Wolfe1 I am different input file but I want to start parallely all chrome instances.
So for 5 input file , it should launch 5 chrome

When you say “input file” do you mean you have 5 different argument files to give?

If so then I think what I listed above should work with something like this:

pabot --processes 5 --argumentfile1 argFile1 --argumentfile2 argFile2 --argumentfile3 argFile3 --argumentfile4 argFile4 --argumentfile5 argFile5 test.robot

That should run 5 parallel instances of test.robot, each using a different argfile

@Wolfe1

I tried below command which is not launching chrome instance. In my case, agumentfile is different text file which I have to upload during UI script navigation. My text file has content which I have to upload those and content inside text file are not linked anywhere

pabot --processes 3 --argumentfile1 test1.txt --argumentfile2 test2.txt --argumentfile3 test3.txt test.robot

Below error
Storing .pabotsuitenames file
2022-06-22 18:26:55.525576 [PID:8904] [0] [ID:1] EXECUTING test Script {test2.txt}
2022-06-22 18:26:55.525576 [PID:9004] [2] [ID:0] EXECUTING test Script {test1.txt}
2022-06-22 18:26:55.525576 [PID:10804] [1] [ID:2] EXECUTING test Script {test3.txt}
2022-06-22 18:26:56.516297 [PID:8904] [0] [ID:1] Execution failed in test Script {test2.txt} with 252 failing test(s)

Lets connect if have time