python
python

Reputation: 4521

Appium vs Espresso for automated testing framework

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:

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

Answers (4)

Santhosh Kumar
Santhosh Kumar

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

karthick23
karthick23

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

kiedysktos
kiedysktos

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:

  • Android and iOS tests can share many classes, including helper methods and configuration,
  • Android and iOS tests can share common tests logic on higher level, while having different or slightly different implementation on lower level (for example sometimes I can just copy whole page object class and make simple change of locators in order to make it work on the other platform),
  • same API enables us to seamlessly switch between the iOS and Android test development in a team. Easy switching to Selenium for Web development is additional benefit.

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

anuja jain
anuja jain

Reputation: 1387

  1. The Shifting will be very much useful as Espresso supports testing activities outside the app like camera, browser and dialer etc which appium does not support.
  2. Espresso you can test toast message, auto complete and dialogs which are outside app.
  3. With Espresso Test Suit you can find code coverage and measure your testing efforts.

Upvotes: 17

Related Questions