Include the test name in the screenshot file name generated by the DefaultFailureHandler
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by locating the DefaultFailureHandler and tracing how it names and saves screenshots when a test fails. Reproduce the issue with a suite containing multiple failures, then verify that each saved screenshot has a distinct test name and that screenshots from all failures remain available.
Written by the indexing model from the issue text.
Description
Description
It would be great to extend the DefaultFailureHandler so that the name of the test becomes part of the file name of the screenshot that is saved on failure.
I have worked around that issue by implementing a custom FailureHandler (https://github.com/Futsch1/medTimer/blob/main/app/src/androidTest/java/com/futsch1/medtimer/MyFailureHandler.java), but I suppose this change could be of general interest.
Steps to Reproduce
Run a test suite with several tests, where more than one failure occurs.
Expected Results
Screenshots are present for each occurred failure
Actual Results
Only the screenshot(s) of the last failed run will be present.
AndroidX Test and Android OS Versions
Android Test version 3.6.1
Android OS version not relevant
Link to a public git repo demonstrating the problem:
https://github.com/Futsch1/medTimer/actions/runs/12536536718/job/34960077359 respectively corresponding reports here: https://github.com/Futsch1/medTimer/actions/runs/12536536718/artifacts/2369493552
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 7
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/android-test
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
android/android-test#681 · 2 comments · 1 reaction ·
-
ξεκσνδξδOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/android-test#2499 ·
-
ησξξσOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/android-test#2498 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
android/android-test#2473 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
android/android-test#2461 · 6 comments · 4 reactions ·
All issues in android/android-test
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Content
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RunestoneInteractive/rs#1559 · 1 comment ·
Maintainers usually reply within 2 days
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
inu-appcenter/memorIN-backend#298 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
opendataloader-project/opendataloader-pdf#757 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
redhat-developer/intellij-quarkus#1626 ·