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

Restructure test name formatting to fix intermittent regression of isolated method runs #341

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

mannodermaus
Copy link
Owner

@mannodermaus mannodermaus commented Jun 15, 2024

Since relying fully on JUnit 4's test discovery mechanism, we need to adhere to its expectations when it comes to method filtering. For dynamic tests with JUnit 5, this means that we have to remove the parameters and brackets from the display name when invoking an individual test through CLI or IDE, otherwise it cannot be found.

This changes the behavior previously introduced in #317, falling back to the legacy reporting of dynamic tests when running them in isolation from the IDE or CLI:

Screenshot 2024-06-15 at 10 14 17

Running the tests in a suite will of course retain the full, prettier name:

Screenshot 2024-06-15 at 10 15 29

It's annoying that the test names are uglier now for isolated runs, but the benefits of relying fully on test discovery from the Android Instrumentation still outweighs it.

Resolves #339

…olated method runs

Since relying fully on JUnit 4's test discovery mechanism, we need to
adhere to its expectations when it comes to method filtering. For dynamic tests
with JUnit 5, this means that we have to remove the parameters and brackets
from the display name when invoking an individual test through CLI or IDE,
otherwise it cannot be found
@mannodermaus mannodermaus self-assigned this Jun 15, 2024
@mannodermaus mannodermaus merged commit a71c2d0 into main Jun 15, 2024
3 checks passed
@mannodermaus mannodermaus deleted the change/retain-param-indices-for-isolated-runs branch June 15, 2024 06:55
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.

Test filtering doesn't work on the latest SNAPSHOT
1 participant