android-testify icon indicating copy to clipboard operation
android-testify copied to clipboard

Generate HTML Report

Open YMonnier opened this issue 1 year ago • 1 comments

Hello, We are interested in using your library, but we are encountering an issue with report generation. Currently, the only format available for generating the report is YAML. Is there a way to obtain the report in HTML format instead, similar to what is available in other tools? eg. Compose Preview Screenshot Testing: image

Thanks

YMonnier avatar Nov 29 '24 09:11 YMonnier

Hi @YMonnier thank you for the request. As Testify is based off of Android Instrumentation Tests, you can use the connectedAndroidTest gradle command which will generate an HTML report.

Like this:

./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=dev.testify.annotation.ScreenshotInstrumentation

You will then find an HTML report in ./build/reports/androidTests/connected/debug/index.html

Granted, these are junit-style reports and do not provide the different images like the Preview Testing does. You can enable the HighContrastDiff mode in Testify to get some extra information about your test failures.

That said, building a "native" HTML report for Testify is certainly something we can put on our roadmap

DanielJette avatar Nov 29 '24 19:11 DanielJette