apache / apache/maven-surefire

[SUREFIRE-1529] Implement test bucketing

Open
#2,576 2 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
461
Forks
588
Avg merge
1d 8h
Merged PRs (30d)
19

Description

**[Zsombor Gegesy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=zsombor)** opened **[SUREFIRE-1529](https://issues.apache.org/jira/browse/SUREFIRE-1529?redirect=false)** and commented

There are projects, which has hundreds or thousands of test, which took hours to complete - to paralelize this, it would be good, if tests could be partitioned automatically into buckets - of course perfect bucketization is not feasible, due to lack of knowledge of test run times (and it would be a NP-complete problem even that case).

The idea is to start tests concurrently, in different machines, something like this:
1. mvn test -DnumberOfBuckets=3 -DbucketId=0
2. mvn test -DnumberOfBuckets=3 -DbucketId=1
3. mvn test -DnumberOfBuckets=3 -DbucketId=2

 And the results could be collected and aggregated later by external processes.

The current solution is to manually collect the tests, and generate huge command lines to do the same.

 

---

**Affects:** 2.22.0

**Attachments:**
- [SUREFIRE-1529.patch](https://issues.apache.org/jira/secure/attachment/12929203/SUREFIRE-1529.patch) (_3.41 kB_)

**Issue Links:**
- [SUREFIRE-1477](https://issues.apache.org/jira/browse/SUREFIRE-1477) CI support for parallel test execution
(_**"duplicates"**_)

**Remote Links:**
- [GitHub Pull Request #187
](https://github.com/apache/maven-surefire/pull/187)

6 votes, 6 watchers

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Maven test commands in the issue and the attached SUREFIRE-1529.patch, then compare the related GitHub pull request #187. Done means tests can be partitioned across the requested bucket IDs and their results remain available for external collection and aggregation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.