Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Futsch1 opened this issue Dec 30, 2024 · 0 comments

Comments

@Futsch1
Copy link

Futsch1 commented Dec 30, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant