mkorpela / pabot

Parallel executor for Robot Framework test cases.
https://pabot.org
Apache License 2.0
476 stars 152 forks source link

Pabot issue - Reading XML source '' failed: No such file or directory #282

Open stefdcgit opened 4 years ago

stefdcgit commented 4 years ago

Hello,

I was able to run the tests (Total 100 suite files, Each .robot file has one test case) in parallel using pabot command until i added another 45 suite file(.robot) to the suite folder (making it to total 152 suite files) and I started getting this issue .

The command line is too long.

WARN: No output files in "C:\Users\Test\workspace\ProjectName\Results\20200620_224906\pabot_results" 0 critical tests, 0 passed, 0 failed 0 tests total, 0 passed, 0 failed

Output:
[ Total testing: 0.20 seconds Elapsed time: 1.36 seconds ERROR ] Reading XML source '' failed: No such file or directory

Pabot command used in the framework - @pabot --pabotlib --processes {parallelNumber} --nostatusrc -v ResultPath:{ResultFilePath} --listener allure_robotframework:{AllureDir} -d {ResultFilePath} -t {TestCaseName} *.robot

Below are the detailed versions that i have been using. robotframework 3.2.1 robotframework-allurereport 1.1.1 robotframework-pabot 1.8.0

I am not sure if there are any limitations on running the number of suite files or if its a compatibility issue. Appreciate any help. Thanks in advance

stefdcgit commented 4 years ago

The test case in the newly added suite file executes successfully with @robot command.

However its unable to run using pabot command. {TestCaseName} is just the parameter to pass test name. Each suite file has different test names in it. Please refer to the console output below

@cd C:\Users\testuser\workspace\projectname\Scripts\ @pabot --processes 1 -v ResultPath:C:\Users\testuser\workspace\projectname\Results\20200620_234628 --listener allure_robotframework:....\Results\allureresults -d C:\Users\Sdcosta\workspace_new_genesisunified\genesis-unifiedrelease\Results\20200620_234628 -t Genesis_Sales_Unclassified_LBA *.robot

Storing .pabotsuitenames file 2020-06-20 23:46:34.520438 [PID:20276] [0] [ID:0] EXECUTING Suites.Genesis Sales Unclassified LBA 2020-06-20 23:46:34.728327 [PID:20276] [0] [ID:0] FAILED Suites.Genesis Sales Unclassified LBA WARN: No output files in "C:\Users\testuser\workspace\projectname\Results\20200620_234628\pabot_results" 0 critical tests, 0 passed, 0 failed 0 tests total, 0 passed, 0 failed

Output:
[ Total testing: 0.20 seconds Elapsed time: 3.54 seconds ERROR ] Reading XML source '' failed: No such file or directory

mkorpela commented 4 years ago

You can use Robot Framework argument file. Put long Robot Framework command line arguments there.

stefdcgit commented 4 years ago

Thanks @mkorpela i am now able to execute tests scripts in parallel. However while running in jenkins frequently facing the below error and due to this the log.html report is not getting generated. When this error occurs i have noticed that the output.xml will be either empty or filled with execution details.

2020-06-23 10:44:04 Reading XML source 'C:\Jenkins\workspace\fiedRelease_feature_test-jenkins\Results\20200623_004854\pabot_results\RegressionSuite.testcasename\output.xml' failed: ParseError: no element found: line 1093, column 55

kpham1001 commented 3 years ago

Any fixed for this ?? I ran into a similar issue. Sometimes the log.html and the report files were not generated .

dimple-doshi commented 3 years ago

@stefdcgit were you able to resolve this without using argument file?

dchourasia commented 3 years ago

@mkorpela I am still facing this issue when I am trying to execute lots of suites in parallel. (using *.robot).

We are already using argument file to pass all the arguments, but number of suites executing in parallel are many. Same command works well with robot.

Command which is failing: pabot --processes 12 --name Dry-Run-Review-Build --pythonpath --pythonpath \Lib --variablefile resources\infrastructure\variables\get_run_parameters.py --include lev2 --variable INFRA:\resources\infrastructure --dryrun -d outputs testsuites\*.robot

Though total suites are many in number, but actual suites executing are around 20, all other suites gets eliminated because of exclude tags.

Another observation is that it fails randomly, sometimes it works as well with same suites and same command.

below is the exception:

The command line is too long. WARN: No output files in "outputs\pabot_results" 0 critical tests, 0 passed, 0 failed 0 tests total, 0 passed, 0 failed

[ Output: ERROR ] Reading XML source '' failed: No such file or directory

mkorpela commented 3 years ago

Star expand is done by the terminal. Pabot will not see it - only the expanded file names. This causes a problem when the same expanded file names are put to terminal again.

Could you use just the directory name instead of director/*.robot ?

hrnaltnts commented 2 years ago

Hello, @mkorpela I face same issue where i used in remote(Jenkins). When i execute local work fine but on remote not work. I have used directory name both of execution.