mardi 30 août 2016

How to test the UI of a layout without attaching it to Activity in Espresso?

I am working on a app where I need to test the layout using Espresso. The problem is that its and orphaned layout without any attachments to activity or fragment (I will attach it later). I would like to test the layout without any interaction of activity or fragments.

For example I have MainActivity with activity_main.xml as its content layout. I also have another layout say "activity_details.xml". I would like to test activity_details which is not attached to any Activity at the moment.

Also it would be great if I can know how to add mock values to the layout.

Aucun commentaire:

Enregistrer un commentaire