mkorpela / pabot

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

[ERROR] EXCEPTION RAISED DURING PABOT EXECUTION #305

Open Prasanna-Kumar-1 opened 4 years ago

Prasanna-Kumar-1 commented 4 years ago

Hello there, i have tried running 4 test suites at a directory level using below command.

C:\Evolution\NewPolicyNonEDI>pabot --processes 4 Tests.

I have got the below error

[``` ERROR] EXCEPTION RAISED DURING PABOT EXECUTION [ERROR] PLEASE CONSIDER REPORTING THIS ISSUE TO https://github.com/mkorpela/pabot/issues Total testing: 0.0 seconds Elapsed time: 0.0 seconds Traceback (most recent call last): File "C:\Users\prasannak\AppData\Local\Programs\Python\Python37-32\Scripts\pabot-script.py", line 11, in load_entry_point('robotframework-pabot==1.10.0', 'console_scripts', 'pabot')() File "c:\users\prasannak\appdata\local\programs\python\python37-32\lib\site-packages\pabot\pabot.py", line 1742, in main outs_dir = _output_dir(options) File "c:\users\prasannak\appdata\local\programs\python\python37-32\lib\site-packages\pabot\pabot.py", line 1227, in _output_dir shutil.rmtree(outpath) File "c:\users\prasannak\appdata\local\programs\python\python37-32\lib\shutil.py", line 516, in rmtree return _rmtree_unsafe(path, onerror) File "c:\users\prasannak\appdata\local\programs\python\python37-32\lib\shutil.py", line 395, in _rmtree_unsafe _rmtree_unsafe(fullname, onerror) File "c:\users\prasannak\appdata\local\programs\python\python37-32\lib\shutil.py", line 400, in _rmtree_unsafe onerror(os.unlink, fullname, sys.exc_info()) File "c:\users\prasannak\appdata\local\programs\python\python37-32\lib\shutil.py", line 398, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: '.\pabot_results\2\robot_stderr.out'



To give a brief back ground of what i am trying

i have got a Folder called 'Tests' in C:\Evolution\NewPolicyNonEDI.
I am trying to run 4 suites which are present in the above folder.

Kindly investigate
stefanbie commented 3 years ago

I got the same error second time I run pabot --processes 2 --testlevelsplit . robotframework-pabot 1.10.0

ac57486 commented 3 years ago

@Prasanna-Kumar-1 I also got the same error. Are you able to resolve it? @mkorpela Could you please help to resolve this issue. I am unable to proceed due to this error. Please note the same command was working fine few days back. I am trying to rerun the failed test cases using pabot PFB pabot command that I am using: pabot --processes 4 -d C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\ --output run1.xml -l C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\run1_log.html -r C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\run1_report.html C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Tests & pabot --processes 4 --rerunfailed C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\run1.xml --output run2.xml -d C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\ -l C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\run2_log.html -r C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\run2_report.html C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Tests

rebot -o C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\output.xml -l C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\log.html -r C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\report.html --merge C:\Jenkins\workspace\CNSMR_TST_SFC_Sanity_Ankita_Pabot\Results\run*.xml

image

mkorpela commented 3 years ago

Seems based on the output and the command that you are executing multiple pabots at the same time from same location

mkorpela commented 3 years ago

There are intermediate output files that are colliding.

ac57486 commented 3 years ago

@mkorpela Then what solution would you recommend if I want to use Pabot for rerunning failed test cases? Or any improvement that could be done in this command?

mkorpela commented 3 years ago

Change the second executions output dir (-d) so that it does not match first one.

ac57486 commented 3 years ago

Okay. I will try and update you

ac57486 commented 3 years ago

@mkorpela It worked..Thanks