At work, I’m learning more about how to use instrumentation tests with Android development. I’m now applying this to my Idea Growr app.
In the beginning I had the problem of not being able to take screenshots of pop-up windows with Spoon. So I’m using the Falcon library to make this happen.
Than I ran into the problem that Idea Growr supports android version with SDK 9 (really old), and the Falcon library has a minimum of SDK 10. So I needed to add a line in my manifest file to work around that:
<uses-sdk tools:overrideLibrary="com.jraska.falcon.spooncompat, com.jraska.falcon" />
At first that didn’t work, but then I found out that I should put it in a separate AndroidManifest file.
I’ve complained about this before, but I keep being surprised how things that seem like ‘core’ parts of Android require you to do some quite obscure Googling. But on the positive side, it’s quite easy to make test scenarios with Espresso.
One of the main goals is to make it easier to develop new features without accidentally breaking existing functionality. Also, I can much easier see how the app works on different devices (emulators).
I’m not there yet. Todo:
- Add more tests
I’ve made a couple of basic tests, like creating an idea with a note, but there is more to be done.
- Figure out how to best test for mutiple languages
There doesn’t seem to be something in Espresso for doing the same test for multiple languages. But it should be do-able
- Figure out screen orientation changes
- Add even more tests