How to execute test cases in parallel using xdist plugin?

334 views Asked by At

I have a pytest test suite with three parameterized test cases. I want to execute the three test cases in parallel. The sample test suite looks as follows.

### test_suite.py ###

def test_case1(param1, param2):
...
def test_case2(param1, param2):
...
def test_case3(param1, param2):
...

I want to create a python sub-process for each of these test cases and execute them in parallel.

I tried py.test -d --tx 3*popen//python=python2.7 -s tests/test_suite.py

However the test cases are not running in parallel. Am I missing something?

Refer documentation (link):

Thanks in advance.

0

There are 0 answers