robotframework-datadriver: Not able to succeed run data-driven xlsx file in parallel (pabot)

Hello, I have tried to execute my data-driven(xlsx) test case (25 processes) using this guidence. When I try to run pabot --testlevelsplit --pabotlib (...) open the same test case 12 times, I hoped it would divide the 25 processes in the xlsx file into 12. I have made mistake somewhere or no way to run data-driven(xlsx) cases in parallel. Thanks in advance.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 27 (11 by maintainers)

Most upvoted comments

i reduced it so that SeleniumLibrary is not longer involved.

*** Settings ***
Library    DataDriver    MostSearched.xlsx   sheet_name=Lapas1
Test Template     Verify Most Searched Term from Excel


*** Test Cases ***
Verify Most Searched Term ${items}    ${items}
    [Tags]  SmokeDaily

*** Keywords ***
Verify Most Searched Term from Excel
        [Arguments]   ${items}
        Log To Console    ${items}
        Sleep    2s

and with this call: ❯ pabot --testlevelsplit --pabotlib atest/TestCases/DEBUG/MostSearchedTerms.robot

It worked well:

❯ pabot --testlevelsplit --pabotlib atest/TestCases/DEBUG/MostSearchedTerms.robot
Robot Framework remote server at 127.0.0.1:8270 started.
2022-02-20 17:03:54.158097 [PID:41009] [0] [ID:0] EXECUTING MostSearchedTerms.Verify Most Searched Term ${items}
2022-02-20 17:03:54.789723 [PID:41009] [0] [ID:0] IGNORED MostSearchedTerms.Verify Most Searched Term ${items}
2022-02-20 17:03:54.792975 [PID:41010] [2] [ID:2] EXECUTING MostSearchedTerms
2022-02-20 17:03:54.793081 [PID:41011] [0] [ID:1] EXECUTING MostSearchedTerms
2022-02-20 17:03:54.794744 [PID:41012] [4] [ID:7] EXECUTING MostSearchedTerms
2022-02-20 17:03:54.794984 [PID:41013] [1] [ID:3] EXECUTING MostSearchedTerms
2022-02-20 17:03:54.795382 [PID:41014] [3] [ID:6] EXECUTING MostSearchedTerms
2022-02-20 17:03:54.795402 [PID:41015] [5] [ID:4] EXECUTING MostSearchedTerms
2022-02-20 17:03:54.796403 [PID:41016] [6] [ID:5] EXECUTING MostSearchedTerms
2022-02-20 17:03:54.799286 [PID:41017] [7] [ID:9] EXECUTING MostSearchedTerms
2022-02-20 17:03:54.801228 [PID:41018] [8] [ID:10] EXECUTING MostSearchedTerms
2022-02-20 17:03:54.802888 [PID:41019] [9] [ID:8] EXECUTING MostSearchedTerms
2022-02-20 17:04:00.220102 [PID:41017] [7] [ID:9] PASSED MostSearchedTerms in 5.2 seconds
2022-02-20 17:04:00.260934 [PID:41012] [4] [ID:7] PASSED MostSearchedTerms in 5.3 seconds
2022-02-20 17:04:00.280685 [PID:41014] [3] [ID:6] PASSED MostSearchedTerms in 5.3 seconds
2022-02-20 17:04:00.294396 [PID:41018] [8] [ID:10] PASSED MostSearchedTerms in 5.3 seconds
2022-02-20 17:04:00.314187 [PID:41019] [9] [ID:8] PASSED MostSearchedTerms in 5.3 seconds
2022-02-20 17:04:02.233756 [PID:41010] [2] [ID:2] PASSED MostSearchedTerms in 7.2 seconds
2022-02-20 17:04:02.234373 [PID:41011] [0] [ID:1] PASSED MostSearchedTerms in 7.2 seconds
2022-02-20 17:04:02.239987 [PID:41013] [1] [ID:3] PASSED MostSearchedTerms in 7.2 seconds
2022-02-20 17:04:02.241076 [PID:41015] [5] [ID:4] PASSED MostSearchedTerms in 7.2 seconds
2022-02-20 17:04:02.338540 [PID:41016] [6] [ID:5] PASSED MostSearchedTerms in 7.3 seconds
25 tests, 25 passed, 0 failed, 0 skipped.
===================================================
Output:  /Users/snooz/Source/Snooz82/robotframework-datadriver/output.xml
Log:     /Users/snooz/Source/Snooz82/robotframework-datadriver/log.html
Report:  /Users/snooz/Source/Snooz82/robotframework-datadriver/report.html
Stopping PabotLib process
Robot Framework remote server at 127.0.0.1:8270 stopped.
PabotLib process stopped
Total testing: 1 minute 3.10 seconds
Elapsed time:  8.52 seconds

@pianofab

You said that you have 12 rows. And you have 12 processes. Therefore each process gets one test case.

then the optimize_pabot would not have any affect.

are you sure that the test are not running in parallel? Can you post you console log, with --loglevel DEBUG as cli option?