Kotlin / kotlinx-kover

Apache License 2.0
1.37k stars 53 forks source link

Support for Screenshot Tests #695

Open DenisBronx opened 1 month ago

DenisBronx commented 1 month ago

What is your use-case and why do you need this feature? With the recent release of the compose-screenshot-testing library by Google, I'm wondering if it's possible to integrate screenshot tests into the coverage report.

I understand that instrumented tests aren't supported, but since these screenshot tests are categorized under screenshotTest and function similarly to regular Java tests, could they still be included in the coverage report with minimal tweaks?

Describe the solution you'd like Given that the official task for running these tests is named validateDebugScreenshotTest, I would expect the corresponding Gradle commands to be something like:

  1. koverVerifyDebugScreenshot
  2. koverHtmlReportDebugScreenshot
  3. koverXmlReportDebugScreenshot
  4. ...

I realize this could be a significant change, so if we need to create a custom task to include these tests, that would be perfectly acceptable.