You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An annotated test method that exists in a class annotated with @RunWith(Parameterized::class) will not be included in a test run that is filtered with test-targets to include only test methods with that annotation. An example project is available here, where the method in the parameterized test class is not included in android_shards.json if test-targets specifies - annotation flank.shard.annotationbug.Annotation.
To Reproduce
Set up an Android project with test-targets specified in the Flank config file that specifies any annotation.
Mark methods in a parameterized test class with the above specified annotation.
Run Flank with the --dump-shards option.
Note that the parameterized annotated methods are not included in the shards file.
Expected behavior
Test methods in parameterized test classes should be included or not based on the same rules that apply to non-parameterized test classes.
Details (please complete the following information):
Have you tested on the latest Flank snapshot?
I'm not sure where Flank snapshots are posted. Happy to test if a link is provided.
Post the output of flank --version.
version: v23.10.1
revision: 36e37aa9c85f5cefc5680efb699d195ee48c2bc9
Total run duration: 0m 0s
Have you found any workarounds for this issue? Running into the same thing and it looks like others might be as well here: google/TestParameterInjector#27
Describe the bug
An annotated test method that exists in a class annotated with
@RunWith(Parameterized::class)
will not be included in a test run that is filtered withtest-targets
to include only test methods with that annotation. An example project is available here, where the method in the parameterized test class is not included inandroid_shards.json
iftest-targets
specifies- annotation flank.shard.annotationbug.Annotation
.To Reproduce
test-targets
specified in the Flank config file that specifies anyannotation
.--dump-shards
option.Expected behavior
Test methods in parameterized test classes should be included or not based on the same rules that apply to non-parameterized test classes.
Details (please complete the following information):
I'm not sure where Flank snapshots are posted. Happy to test if a link is provided.
Additional context
To make the issue clear (and to verify some other configuration issue didn't cause this problem) I've created a demo project: https://github.com/steverichey/flankshardannotationbug
The text was updated successfully, but these errors were encountered: