android / android/testing-samples
Custom Listener gets a null parameter on the testRunStarted() method
- Dominant language
- Java
- Stars
- 9.3k
- Forks
- 3.6k
- PR merge metrics
- No merged PRs in 30d
Description
Repro code @ https://github.com/googlesamples/android-testing/pull/105
I basically tried two things:
1) I opened the project in Android Studio and setup the listener by adding:
`-e listener com.example.android.testing.androidjunitrunnersample.suite.MyListener`
If I breakpoint on `super.testRunStarted(description);` I get that description is null when it shouldn't.
2) I have also tried using the cmd line by running `./gradlew connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.listener=com.example.android.testing.androidjunitrunnersample.suite.MyListener`
testRunStarted() is still called with description == null.
Contributor guide
Research direction
Start with the repro code in pull request 105 and the MyListener entry point named in the issue. Run connectedAndroidTest with the listener argument, then trace the testRunStarted() callback and compare the received description with the expected test run metadata. Done means the custom listener receives a non-null description in both Android Studio and command-line runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100