You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Short summary: automation tests split into two groups, one needing a precondition fixture based on worker nodes. During Jenkins runs, test groups execute on different workers each time, causing inconsistency
Description:
Hello all!
I have a next issue and cannot fix it for a while.
So, we have a UI automation repo, with 200 tests. All this test are separated in 2 big groups using pytest.mark.xdist_group
For one group, lets say G1 is required to execute one precondition fixture, and for G2 we dont need this fixture.
And we have next implementation in the code like:
if node == "gw1":
yield
else:
required precondition
And the issue is, every time during jenkins job execution, ours test group executing in diff workers.
Like today G1 tests will run on gw0, and tomorrow G1 tests will run on gw1
Do you know how to fix this ?
The text was updated successfully, but these errors were encountered:
Right now you cannot force a specific worker for tests grouped using xdist_group, the only guarantee is that they will executing in the same worker; like you described, it is possible for example for the tests of the same group execute all in gw1 in the first session, then gw7 in the next, and so on.
The purpose of the feature is not to specify exactly which worker to run on, just to ensure that tests of the same group execute in the same worker.
If you group your tests according to your "precondition fixtures", things should work out OK, it should not matter if "G1" tests execute on gw0 or gw1, as long as they execute in the same worker.
Short summary: automation tests split into two groups, one needing a precondition fixture based on worker nodes. During Jenkins runs, test groups execute on different workers each time, causing inconsistency
Description:
Hello all!
I have a next issue and cannot fix it for a while.
So, we have a UI automation repo, with 200 tests. All this test are separated in 2 big groups using pytest.mark.xdist_group
For one group, lets say G1 is required to execute one precondition fixture, and for G2 we dont need this fixture.
And we have next implementation in the code like:
if node == "gw1":
yield
else:
required precondition
And the issue is, every time during jenkins job execution, ours test group executing in diff workers.
Like today G1 tests will run on gw0, and tomorrow G1 tests will run on gw1
Do you know how to fix this ?
The text was updated successfully, but these errors were encountered: