© Denys Zelenchuk 2019
Denys ZelenchukAndroid Espresso Revealedhttps://doi.org/10.1007/978-1-4842-4315-2_15

15. Improving Productivity and Testing Unusual Components

Denys Zelenchuk1 
(1)
Zürich, Switzerland
 

This chapter contains code samples that were not covered in other chapters and Espresso testing tips that may increase your daily test writing productivity.

Creating Parameterized Tests

Sometimes we may have a need to write a single test that is applicable to many similar cases. For example, we might need a test that validates how the same EditText field behaves with different String values provided as input. In this case, the JUnit Parameterized custom runner can be used. It allows us to have one test inside a parameterized class ( https://github.com/junit-team/junit4/wiki/parameterized-tests ...

Get Android Espresso Revealed: Writing Automated UI Tests now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.