Summary
When running Android instrumentation tests with Marathon and
de.mannodermaus.junit5.AndroidJUnit5Builder, parameterized JUnit 5 tests are reported inconsistently.
Child invocations are executed and reported as passed, but Marathon cannot map them to discovered tests and marks the parent test as incomplete/failed.
It looks related to log-only discovery (-e log true) expectations used by external runners/tools.
Environment
- android-junit5 runner builder:
de.mannodermaus.junit5.AndroidJUnit5Builder
- Marathon:
0.10.4
testParserConfiguration = remote
- Android runner:
androidx.test.runner.AndroidJUnitRunner
Observed behavior
- During execution, child entries like:
...#postTokensResponseException[Pans, KClass] - [2] ... passed
- But Marathon logs:
No FSM registered for test ...
- then marks parent as
incomplete/failed
Expected behavior
Tools relying on instrumentation discovery/log protocol should receive a stable and complete test mapping for parameterized tests, so child results can be matched correctly.
Notes from code inspection
In ParsedSelectors.fromBundle(...), selector parsing is based on class and exact method matching.
Method filtering appears strict (it.name == methodName), while incoming method strings may include parameterized suffixes (#method[...]), which can cause fallback to class-level selector and downstream mismatches.
Repro (minimal)
- Create a JUnit 5 parameterized instrumentation test.
- Run through Marathon with remote parser.
- Observe passed child invocations and
No FSM registered / incomplete at final summary.
Question
Would you consider adding explicit support/compatibility for Android log-only discovery (-e log true) and/or more robust parsing/mapping for parameterized method selectors?
Summary
When running Android instrumentation tests with Marathon and
de.mannodermaus.junit5.AndroidJUnit5Builder, parameterized JUnit 5 tests are reported inconsistently.Child invocations are executed and reported as passed, but Marathon cannot map them to discovered tests and marks the parent test as incomplete/failed.
It looks related to log-only discovery (
-e log true) expectations used by external runners/tools.Environment
de.mannodermaus.junit5.AndroidJUnit5Builder0.10.4testParserConfiguration = remoteandroidx.test.runner.AndroidJUnitRunnerObserved behavior
...#postTokensResponseException[Pans, KClass] - [2] ... passedNo FSM registered for test ...incomplete/failedExpected behavior
Tools relying on instrumentation discovery/log protocol should receive a stable and complete test mapping for parameterized tests, so child results can be matched correctly.
Notes from code inspection
In
ParsedSelectors.fromBundle(...), selector parsing is based onclassand exact method matching.Method filtering appears strict (
it.name == methodName), while incoming method strings may include parameterized suffixes (#method[...]), which can cause fallback to class-level selector and downstream mismatches.Repro (minimal)
No FSM registered/incompleteat final summary.Question
Would you consider adding explicit support/compatibility for Android log-only discovery (
-e log true) and/or more robust parsing/mapping for parameterized method selectors?