DEV Community

Leveraging The Robot Pattern For Espresso Tests

Adam McNeilly on July 04, 2017

Originally published on Android Essence. Espresso is a testing framework for Android that allows developers to write automated tests for their app...
Collapse
 
codyengel profile image
Cody Engel

I'm implementing this currently in my own app, I was wondering if you have thought about creating an annotation processor to generate the Robots for you? I'm sort of tempted to create one if one doesn't already exist since this pattern is incredibly powerful and it seems like it'd be practical to automate a lot of the setup.

Collapse
 
adammc331 profile image
Adam McNeilly

I'm not that familiar with annotation processors, but if you can find a way to pull it off I think it would be interesting. I'm not quite sure where you would put the annotations and what the usage would look like?

Collapse
 
igorganapolsky profile image
Igor Ganapolsky

This is a nice illustration of getting started with the robot pattern. I'm curious, is it a testing approach that was invented by Google, or some other company?

Collapse
 
adammc331 profile image
Adam McNeilly

Thanks for reaching out! I do not believe the pattern was invented by Google, but I'm unsure of its origins.

Collapse
 
chrisvasqm profile image
Christian Vasquez

Thanks a lot for this post! I've been interested in adding test to my personal projects and this looks awesome.

Would give an extra ♥️ just because of Kotlin 👌

Collapse
 
adammc331 profile image
Adam McNeilly

I'm glad you liked it! I hope the sample application helps you. Reach out if you have any trouble getting started with Espresso.