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
Next, specify the following filter in build.gradle.kts file:
marathon {
// omitted code
filteringConfiguration {
val unionFilterList =listOf(
TestPackageFilterConfiguration(regex ="first_part.*".toRegex()),
TestPackageFilterConfiguration(regex ="second_part.*".toRegex())
)
val unionFilterConfiguration =CompositionFilterConfiguration(
filters = unionFilterList,
op =CompositionFilterConfiguration.OPERATION.UNION
)
val annotationFilterConfiguration =AnnotationFilterConfiguration(
values =listOf("annotation.SomeTestAnnotation")
)
allowlist {
add(
CompositionFilterConfiguration(
filters =listOf(
unionFilterConfiguration,
annotationFilterConfiguration
),
op =CompositionFilterConfiguration.OPERATION.SUBTRACT
)
)
}
}
}
It seems that when subtracting sets (ExampleInstrumented1Test, ExampleInstrumented2Test, ExampleInstrumented3Test, ExampleInstrumented4Test, ExampleInstrumented5Test, ExampleInstrumented6Test) and (ExampleInstrumented1Test) should have turned out (ExampleInstrumented2Test, ExampleInstrumented3Test, ExampleInstrumented4Test, ExampleInstrumented5Test, ExampleInstrumented6Test), however, for some reason it turns out an empty set and marathon does not plan a single test.
To Reproduce
Steps to reproduce the behaviour:
extract zip with project marathon-filter-playground-main.zip
execute in terminal from project folder ./gradlew :app:marathonDebugAndroidTest
see output there will be something like this:
I 18:58:24.363 [main @coroutine#2] <com.malinskiy.marathon.Marathon> Scheduling 0 tests
Expected behavior
I would expect correct subtraction of sets when creating a composite filter.
P.S
Maybe I don't know something and it's not really a bug.
Describe the bug
When specifying a composite filter in marathon plugin configuration, subtraction works strangely.
Imagine that the following android tests are given:
Next, specify the following filter in
build.gradle.kts
file:It seems that when subtracting sets
(ExampleInstrumented1Test, ExampleInstrumented2Test, ExampleInstrumented3Test, ExampleInstrumented4Test, ExampleInstrumented5Test, ExampleInstrumented6Test)
and(ExampleInstrumented1Test)
should have turned out(ExampleInstrumented2Test, ExampleInstrumented3Test, ExampleInstrumented4Test, ExampleInstrumented5Test, ExampleInstrumented6Test)
, however, for some reason it turns out an empty set and marathon does not plan a single test.To Reproduce
Steps to reproduce the behaviour:
marathon-filter-playground-main.zip
./gradlew :app:marathonDebugAndroidTest
Expected behavior
I would expect correct subtraction of sets when creating a composite filter.
P.S
Maybe I don't know something and it's not really a bug.
Logs and reports
marathon_filter_playground.log
marathon-filter-playground.zip
Devices (please complete the following information):
Additional context
Reproduced on marathon versions 0.7.6/0.8.0
The text was updated successfully, but these errors were encountered: