Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


After instrument the app the tool provide easy way to access the objects and execute actions and validations.

Setup the Espresso

In order to add Espresso test to your project you should :
1. Install it , by adding the lib to the gradle file:


Building the app with the following configuration will open the Espresso API and you can start write your tests.

How to write Espresso tests?

Espresso commands are sync with the UI and wait for the elements.
The command build from the following steps:


Device in perfecto system while the test is running

Why Perfecto?

  • Perfecto cloud allows you to execute your existing Espresso tests on any real devices with any Android version.
  • Perfecto system generates rich report include the test video so you can get more details on your test.
  • Visual validation - Espresso tests work on the objects but can't validate the if the objects display properly
    Perfecto allows you to add visual validation to avoid the following issue:


only visual validation can find the bug above

How to start ?

In order to execute the Espresso test from command line you should use Espresso Executecommand :


The command executes the test via shell command on the device and shows the results in Perfecto reports.

View file

Espresso execution

This video shows how to execute the Espresso command on Perfecto device and how the results present in the report

Widget Connector