Skip to content

add pytest-split to allow splitting test running in groups#2589

Merged
rochdev merged 4 commits intomainfrom
pytest-split
Jun 26, 2024
Merged

add pytest-split to allow splitting test running in groups#2589
rochdev merged 4 commits intomainfrom
pytest-split

Conversation

@rochdev
Copy link
Copy Markdown
Member

@rochdev rochdev commented Jun 22, 2024

Motivation

System tests are notoriously slow to the point that they are quickly becoming unusable as they take too long to run. While improving their speed would definitely be the better option, having the ability to split the tests on multiple machines is a quick fix that will allow running them faster at least in CI.

Changes

Add pytest-split to allow splitting test running in groups.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner. We're working on refining the codeowners file quickly.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Relevant label (run-parametric-scenario, run-profiling-scenario...) are presents
  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • CI is green, or failing jobs are not related to this change (and you are 100% sure about this statement)
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

@cbeauchesne
Copy link
Copy Markdown
Collaborator

cbeauchesne commented Jun 24, 2024

Hi @rochdev !

What scenarios do you want to split ?

If it's parametric, there is already pytest-xdist on the repo, if it's not activated on your repo, I can help you on that.

If it's other scenarios, unfortunately it won't work, as the test part of the run is actually the fasted, The long part is spawning the infra, and running the set-up, which can't be splitted. The solution here is parallel execution in the CI, where I can also help.

@rochdev rochdev marked this pull request as ready for review June 24, 2024 15:27
@rochdev rochdev requested a review from a team as a code owner June 24, 2024 15:27
Copy link
Copy Markdown
Collaborator

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment yesterday 👆

@rochdev
Copy link
Copy Markdown
Member Author

rochdev commented Jun 25, 2024

If it's parametric, there is already pytest-xdist on the repo, if it's not activated on your repo, I can help you on that.

First step is parametric, but then other tests as well if at all possible. For xdist, unfortunately it doesn't help at all, and parallelizing on 16 cores didn't make any difference unfortunately (well, a tiny difference of maybe 20% but that could just be faster cores).

@rochdev
Copy link
Copy Markdown
Member Author

rochdev commented Jun 25, 2024

@rochdev rochdev merged commit a7ecda1 into main Jun 26, 2024
@rochdev rochdev deleted the pytest-split branch June 26, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants