[Appium][Python]Run tests in parallel with pytest

This is alternative way to run Appium tests in parallel in Python.
I wrote [Appium]Run tests in parallel with parallel_tests gem before to run Appium tests in parallel in Ruby with parallel_tests gem.

In this article, I’d like to put a link to do similar thing in Python.

I’ve created an issue to prepare an example in a python-client repository.
https://github.com/appium/python-client/issues/247

I haven’t implemented it yet, but in https://github.com/KazuCocoa/appium/commit/98034eb716d526fc54d7b3fac5acd249cd5fac9d , you can see an example to run tests in parallel with pytest.

The key is os.getenv('PYTEST_XDIST_WORKER'). In pytest, we can identify which process conduct test cases with PYTEST_XDIST_WORKER. You can see another way in https://github.com/pytest-dev/pytest-xdist#identifying-the-worker-process-during-a-test though.

2 Comments

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.