Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up JUnit 5 coverage by supporting single phase test discovery/execution #1040

Merged
merged 2 commits into from Jun 22, 2022

Conversation

hcoles
Copy link
Owner

@hcoles hcoles commented Jun 22, 2022

Unlike JUnit 3 & 4, JUnit 5 does not seperate the concept of discovering
and executing test, running them as they are found. This resulted in
very efficient coverage calculation for pitest. Each JUnit 5 tests was
executed twice.

This change updates pitest to support both models (seperate discovery,
and single stage) by adding a listener to the TestUnitFinder interface
to detect test execution during discovery.

This is a breaking change to the TestUnitFinder api, all test plugins must be updated.

It would be difficult to properly support the little used dependencyDistance
parameter with these changes, so it has been removed.

Henry Coles added 2 commits June 21, 2022 12:55
Unlike JUnit 3 & 4, JUnit 5 does not seperate the concept of discovering
and executing test, running them as they are found. This resulted in
very efficient coverage calculation for pitest. Each JUnit 5 tests was
executed twice.

This change updates pitest to support both models (seperate discovery,
and single stage) by adding a listener to the TestUnitFinder interface
to detect test execution during discovery.
@hcoles hcoles merged commit 98b9f64 into master Jun 22, 2022
@hcoles hcoles changed the title Speed up JUnit 5 coverage but supporting single phase test discovery/execution Speed up JUnit 5 coverage by supporting single phase test discovery/execution Jun 22, 2022
@hcoles hcoles deleted the feature/junit5_style_discovery branch July 15, 2022 10:52
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.

None yet

1 participant