-
Notifications
You must be signed in to change notification settings - Fork 53
Invalid test names for repeated and parametrized tests #317
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
Comments
Sorry for my bad explanation. If you execute a whole class, the issue won't appear. Can you try executing only |
Thank you for the quick response and explanation! No worries, I was the one who read it wrong – "only one test" was referring to a single test method, not a single test class. With this cleared up, I can reproduce this on my end as well: ![]() Having identical test names could create other problems down the line, so this is definitely something that needs fixing. Thanks for reporting! |
Good news! I narrowed down the cause for this to some special case handling inside the test tree generator. Unfortunately, I cannot simply remove this safeguard, as it would break other single-method executions from the IDE (such as #199 and #207, which were the original motivation for adding this). The reason is a limitation in how the Android instrumentation expects its classic tests to be named. This restriction doesn't seem to apply to all kinds of tests though, so I may have an approach in the works. Stay tuned for more. Edit: We've got it. 💪 ![]() |
This will be released alongside the upcoming instrumentation test libraries 1.5.0! If you need the fix now, you can use the |
Thank you so much! |
Sorry for bothering you again, but it looks like |
Not on Maven Central anyway, that's correct. You'd need to grab them from their snapshots repository by adding the following repository to your project:
Sorry, I usually add this to my comments when resolving tickets, but forgot this time. 🙈 |
Information about the test's parameter and repetition is not included in the test name when tests are executed not as a whole test class/suite, but separately, one by one. This leads to the automatically generated logcat logs having the same filename and therefore being overwritten on each repetition/parameter.



E.g. on the screenshot below the whole test suite is executed. Test names contain the information about repetitions and parameters.
Here only one test is executed at a time. No information about repetitions and parameters.
The text was updated successfully, but these errors were encountered: