mkorpela / pabot

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

Pabot Parallelism Issue with Latest version of Robot Framework == 7.0 #564

Closed SireenAtGitHub closed 10 months ago

SireenAtGitHub commented 10 months ago

I am not into much of a development of the framework, but this morning I have encountered a serious trouble with latest version (7.0) of robot accompanied with pabot (2.16).

For a below command, it ends up creating a thread single testcase for the given number of processes.

pabot --testlevelsplit --processes 6 testSuite.robot

Suppose above Test Suite has 8 test cases inside. with the pabot execution, it creates 6 instances of a 1st test cases and I would end up executing each testcase 6 times in the execution.

reubenmiller commented 10 months ago

@SireenAtGithub Can you try again with version 2.17.0 as RobotFramework 7.0 did deprecate a few things which were being used in previous pabot versions.

The latest version should support RobotFramework 7.0 (as the extended CI tests are passing)

SireenAtGitHub commented 10 months ago

@reubenmiller - With which PR did it resolve the issue? Do you have that info?

reubenmiller commented 10 months ago

@reubenmiller - With which PR did it resolve the issue? Do you have that info?

Nothing specific to this exact problem however RF 7.0 dropped some support for some previously deprecated features, so I'm assuming some previous function silently broke with RF 7.0...pabot now actively runs tests against different RF versions included 7.0, and all the tests passed...so I'm hoping that also solves your problem, but if not, then it will be clear that there is something still yet to do.

reubenmiller commented 10 months ago

But in general listing more information about your issue would be helpful to anyone reading this, e.g.:

I'm not a maintainer or anything, however generally the more information you have the more chance that someone can potentially help.

SireenAtGitHub commented 10 months ago

Thanks for you valuable feedback. However, Upgrading pabot version to (2.17) did not help. I still see the same behavior.

Python Version: 3.10

Installation Commands:

pip install --upgrade robotframework pip install --upgrade robotframework-pabot

Library Version Installed:

robotframework==7.0 robotframework-pabot==2.17

I think there are some missing tests to be covered in CI Tests for pabot (2.17).

roland-ruedenauer commented 10 months ago

It doesn't seem to be the case here, but the backwards incompatible change introduced with #4721 in Robot Framework 7.0 will lead to problems when using --include with pabot. The reason is pabot itself adds a --test argument to the robot command line. And with the now cumulative behavior of --include you will see tests being executed multiple times.

pekkaklarck commented 10 months ago

I tried to reproduce the original issue, but everything worked as expected with pabot --testlevelsplit --processes 6 tests.robot with tests.robot containing eight dummy tests. I only tested with the latest Pabot version.

I also tried to reproduce the apparently separate issue with --include but everything worked as expected with that as well.

Could you provide a bit more detailed instructions how to reproduce these problem? The --include problem should probably get its own issue.

mkorpela commented 10 months ago

Got the reproduce done for the include case:

*** Test Cases ***
Testing 1
   [Tags]  eka  moka
   Log  hello world

Testing 2
   [Tags]  toka  moka
   Log  Hell Yeah

Run this with pabot --verbose --testlevelsplit --include moka test.robot

On RF this shifts to robot --test 'Test.Testing 1' --include moka .. test.robot robot --test 'Test.Testing 2' --include moka .. test.robot

With RF 6.1.1 the first executes only "Testing 1" and second executes only "Testing 2".

With RF 7.0.x both execute "Testing 1" and "Testing 2"

mkorpela commented 10 months ago

Assuming this to be fixed in 2.18.0. If not please raise a new issue.