Skip to content

Support AndroidJUnitRunner log-only discovery (-e log true) for JUnit5 parameterized tests #410

@GermanMalykh

Description

@GermanMalykh

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)

  1. Create a JUnit 5 parameterized instrumentation test.
  2. Run through Marathon with remote parser.
  3. 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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions