airbnb / Showkase

🔦 Showkase is an annotation-processor based Android library that helps you organize, discover, search and visualize Jetpack Compose UI elements
https://medium.com/airbnb-engineering/introducing-showkase-a-library-to-organize-discover-and-visualize-your-jetpack-compose-elements-d5c34ef01095
Apache License 2.0
2.1k stars 107 forks source link

Shot is not working #326

Closed drdla49 closed 1 year ago

drdla49 commented 1 year ago

I used Showkase 1.0.0-beta18 and Shot 5.13.0 in my android app.

I add this to my app build.gradle classpath("com.karumi:shot:5.13.0")

This to my Showkase module ` plugins { id("shot") }

dependencies { debugImplementation("com.airbnb.android:showkase:1.0.0-beta18") testImplementation("com.airbnb.android:showkase-screenshot-testing-shot:1.0.0-beta18") .... }

android { defaultConfig { testInstrumentationRunner "com.karumi.shot.ShotTestRunner" testApplicationId "cz.samle.app.test.screenshot" } } And this class to androidTest in the same module @ShowkaseScreenshot(rootShowkaseClass = ShowkaseModule::class) abstract class MyShowkaseScreenshotTest : ShotShowkaseScreenshotTest() `

Then run this command ./gradlew appDebugExecuteScreenshotTests -Precord

The result of command is success but with this message:

??  Pulling screenshots from your connected devices!
Shot ADB warning: We could not pull screenshots from folder: /storage/emulated/0/Download/screenshots/cz.sample.app/screenshots-default/
Shot ADB warning: We could not pull screenshots from folder: /storage/emulated/0/Download/screenshots/cz.sample.app/screenshots-compose-default/
Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/cz.sample.app/screenshots-default/: No such file or directory
Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/cz.sample.app/screenshots-compose-default/: No such file or directory

> Task :showkase:appDebugExecuteScreenshotTests
?  Saving screenshots.
? We couldn't find any screenshot. Did you configure Shot properly and added your tests to your project?

What am I doing wrong? Thanks for answer

vinaygaba commented 1 year ago

This might just be a duplicate of #327. I've responded on that issue. Take a look.