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
Current behavior
So I recently observed why my few test cases always fail, despite re-running them individually resulting in passing ( as there is some dependency of test data on previous tests.
Note - I know all the tests should be run in isolation but there is no other way because creating data takes an hour at least in the product and for every test creating their own test data is just not feasible.)
So basically I have arranged all my tests in folders and sub-folders so that all the tests run in a sequence that is optimal. I looked at the sequence of test executions and how they are run and found the problem.
The current execution sequence is all tests residing at the same level in API and UI both get executed first and then the next hierarchy level tests are executed including both API and UI folder and so on.
Directory structure:
Execution sequence:
Desired behavior
In the above tree, I would expect all the tests in the API folder to run first and then the first sub-folder and every subfolder inside it and so on, and once everything inside API folders is executed test execution will move to the UI folder. So my question is, is this coming from preprocessor; and is there a way to change the execution sequence?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Current behavior
So I recently observed why my few test cases always fail, despite re-running them individually resulting in passing ( as there is some dependency of test data on previous tests.
Note - I know all the tests should be run in isolation but there is no other way because creating data takes an hour at least in the product and for every test creating their own test data is just not feasible.)
So basically I have arranged all my tests in folders and sub-folders so that all the tests run in a sequence that is optimal. I looked at the sequence of test executions and how they are run and found the problem.
The current execution sequence is all tests residing at the same level in API and UI both get executed first and then the next hierarchy level tests are executed including both API and UI folder and so on.
Directory structure:
Execution sequence:
Desired behavior
In the above tree, I would expect all the tests in the API folder to run first and then the first sub-folder and every subfolder inside it and so on, and once everything inside API folders is executed test execution will move to the UI folder. So my question is, is this coming from preprocessor; and is there a way to change the execution sequence?
Beta Was this translation helpful? Give feedback.
All reactions