Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

⚡️ Implement xdist for parallel testing #165

Merged
merged 11 commits into from
Jul 7, 2022

Conversation

tabaktoni
Copy link
Contributor

@tabaktoni tabaktoni commented Jul 6, 2022

Development related changes

Introduce parallel testing for local development or SSH machine split testing
poetry run pytest -v -n auto --dist loadscope test/

You can specify n number of workers that will execute the test.
-n auto

My machine is a Dual-Core Intel Core i5 so -n auto will set a number of workers based on a number of cores to 2.
However, based on my test I get the best performance when set -n 4 so each core deal with two workers.

  • ⚡️ local test from 30+ min -> 19 min (Dual-Core Intel Core i5)
  • package added pytest-xdist

Checklist:

  • No linter errors
  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Documented the changes
  • Linked the issues which this PR resolves
  • Updated the tests
  • All tests are passing

@tabaktoni tabaktoni changed the title ⚡️ Implement xdist for parallel tetsing ⚡️ Implement xdist for parallel testing Jul 6, 2022
@tabaktoni tabaktoni requested a review from FabijanC July 6, 2022 15:39
test/settings.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
test/settings.py Outdated Show resolved Hide resolved
test/settings.py Outdated Show resolved Hide resolved
test/settings.py Outdated Show resolved Hide resolved
test/settings.py Outdated Show resolved Hide resolved
test/settings.py Outdated Show resolved Hide resolved
@tabaktoni tabaktoni requested a review from FabijanC July 7, 2022 13:03
@FabijanC FabijanC merged commit 127fad7 into master Jul 7, 2022
@FabijanC FabijanC deleted the feature/dist-local-tests branch July 7, 2022 14:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants