Skip to main content

Posts

Showing posts from 2013

Tired of testing - take some Espresso!

Recently Google announced the new testing toolEspresso for Android - a simple API for writing reliable UI tests. So, I'd like to share with you some information about it and what I've experienced using it so far. 
At first Espresso tool was not announced alone, it is used together withGoogleInstrumentationTestRunner- an improved InstrumentationTestRunner. That means that you have to claim it's usage inAndroidManifest.xmlfile of your test application and set it in test projectRun Configurations.
Espresso set up instructions are quite clear, at least for Eclipse IDE. If everything goes well you'll manage to run first test in 30 minutes. 
Keep in mind following points which I hope will help you to save some time before starting: you have to check that your test project and project under test have no reused libraries. Most common one is android-support-v4.jar. You have to remove them from test project. Having jars in both projects will lead to below issueandroid.test.suiteb…