How to run parallel automation tests in Pytest on LambdaTest
If you want to run parallel automation tests in Pytest on Lambdatest, you can use the following steps. You can refer to sample test repo here.
Ensure that pytest package is installed by running:
pip install pytest-selenium
To run parallel tests using PyTest, we would have to execute the below command in the terminal:
pytest -s -n=2 tests/lt_sample_todo.py
In the above command, we have used -s to disable the output capture & -n is used to specify the number of parallel test execution. Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on LambdaTest automation dashboard.