Reputation: 4521
For last few weeks, I was using Appium(python)
for android testing but yesterday we have decided to shift to Expresso(Java)
for automated testing. There are couple of reasons why we are making this shift:
We want to scale out our automated testing, and there are lot of features not present in appium.
This is one of the latest testing framework for android, and has nice backward compatibility.
I have been reading for Espresso but I don't find anything great at all, If I compare it with Appium. I am a Python/R developer
so maybe there are couple of points I am not able to understand. Would anyone like to help me understand if the shift to this new testing framework will be good for future? I am missing the bigger picture here, and any help would be greatly appreciated.
Upvotes: 19
Views: 15368
Reputation: 313
The main difference between the two is,
Espresso test is within the application and it is aware of all the layers of the application. So you can mock certain layers of app, more like a white-box testing
Appium tests are black-box, tests know only the UI layer of the app. Main advantage is for cross-platform testing.
Upvotes: 6
Reputation: 1331
You can go to Espresso if you're sticking only to Android automation and have no idea of automating iOS.
AFIKW, Espresso needs source code of the app in order to automate it.
Advantage is, it's directly open-sourced by google.
But my go is to go with Appium since its a large open sourced community with huge enhancements on its way and easy to automate with any programming language and needless to say it supports both Android and iOS.
Upvotes: 13
Reputation: 4100
I agree that Espresso may be be very efficient when it comes to Android testing solely. For example, it can run only the activity it's testing, which is great.
Still, I stick to the Appium because it has the same API for both AndroidDriver and iOSDriver. Usually Android apps are accompanied by iOS apps, and if you're responsible for the UI automation, you have to take overall costs into account.
Appium has following advantages over platform-specific solution:
The biggest disadvantage of Appium is the speed of longer test scenarios and some difficulties in locating elements, but still it's my choice.
As the side note, I'd like to add that you shouldn't forget about the test pyramid which refers to test automation. Please keep balance between Unit Tests, Integration tests and UI tests http://martinfowler.com/bliki/TestPyramid.html
Upvotes: 8
Reputation: 1387
Upvotes: 17