is a pytest plugin that allows you to customize the order in which your tests are run. It uses the marker order that defines when a specific test shall run, either by using an ordinal number, or by specifying the relationship to other tests.
Questions tagged [pytest-order]
5 questions
2
votes
1 answer
PyTest Parametrized Test in order
I have 2 pyTest test cases that take a parameter. I want to run them in order with both params, instead of the first test running with all possible values, and then the 2nd test starting.
Consider the below test code:
import…

Anchit Arnav
- 371
- 2
- 7
1
vote
1 answer
Pytest order test A, then test B and then test A again
Is it possible to order tests the way, that test A will go first, then test B go second and then test A will go again as third?
I am using pytest-order lib.
Tech stack: Python 3.8.5, pytest 6.1.0, pytest-order 1.0.1
Here is the code used:
import…

dubaksk
- 91
- 2
- 10
0
votes
0 answers
Pytest BDD - how to abort the test run based on a flag value
I have multiple step def file and decorated them with pytest.mark.order marker.So each step def file has a order marker so that I can run these files in a certain order.
Each file run multiple test cases based on the SCENARIO example defined in my…

Vikas
- 1
- 1
0
votes
0 answers
Why some testcases fail in Pytest even after their dependencies have run successfully before them?
I have been trying to run some testcases which are dependent on other testcases. So, I made sure to use the pytest.mark.dependency marker and also made sure that the dependencies (the ones upon which the cases are dependent) execute before the…
-1
votes
2 answers
Can't make pytest dependency work for different modules
Following this answer and the doc, I am trying to make tests depend on each other between files:
test_connectivity.py:
@pytest.mark.dependency(depends=["test_services_up.py::test_sssss"], scope="session")
def test_aaa():
assert…

Gulzar
- 23,452
- 27
- 113
- 201