Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Include the test name in the screenshot file name generated by the DefaultFailureHandler

Open
#2,329 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, java
Domain
mobile, testing

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from android/android-test

All issues in android/android-test

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.