简体   繁体   中英

It is possible to test widget with Espresso

I'm writing tests for my app, and one part is involving a widget. I can't find anything on the subject: it is possible to automatically test widgets with Espresso?

No.

Espresso is made to run tests in the process of an activity. Widgets belong to the home screen (app).

UI automator could be a solution for testing widgets ( https://developer.android.com/training/testing/ui-testing/uiautomator-testing.html )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM