I'm using Pytest, and having the following structure of tests :
ClassA.py
---------------test_a
---------------test_b
---------------test_c
And Also
ClassB.py
---------------test_d
---------------test_e
---------------test_f
I'm running my tests via terminal command (i.e.: pytest -v -s ClassA.py)
My question: Is there a way to run ClassA & ClassB in parallel (2 instances you might say), while maintaining order on each class - separately? Meaning I want all tests from ClassA will run on 1st browser instance, and all tests from ClassB will run on a different instance.
I'm also familiar with parallel test execution using the 'pytest-xdist' plug-in. But once using it the test cases that are in ClassA and ClassB are executed in the mixed order, so that is not good for me.
EDITED: My main purpose is to avoid from test_a running on a separate browser instance of test_b. I would like the tests on each class to run on the same browser instance