cashapp / paparazzi

Render your Android screens without a physical device or emulator
https://cashapp.github.io/paparazzi/
Apache License 2.0
2.22k stars 210 forks source link

Record only one test class #1399

Closed soygabimoreno closed 2 months ago

soygabimoreno commented 2 months ago

We can record all the tests inside a module with:

./gradlew sample:recordPaparazziDebug

I would like to do something like this:

./gradlew sample:recordPaparazziDebug --tests <package-name>.<test-class>

Would it be possible to record only one test class?

The outcome is to skip all unrequired records inside a module.

Thank you very much for the help! 🙂

jrodbx commented 2 months ago

Yes, this is supported!

./gradlew sample:recordPaparazziDebug --tests=app.cash.paparazzi.sample.LaunchViewTest or even ./gradlew sample:recordPaparazziDebug --tests=app.cash.paparazzi.sample.LaunchViewTest.pixel3_differentThemes

> Task :sample:testDebugUnitTest

app.cash.paparazzi.sample.LaunchViewTest > pixel3_differentThemes PASSED
See the Paparazzi report at: file:///Users/jrod/Development/paparazzi/sample/build/reports/paparazzi/debug/index.html

BUILD SUCCESSFUL in 24s
30 actionable tasks: 29 executed, 1 from cache