Monday, January 6, 2014

Testing on Android (Part 2): Functional Tests

Here's part two of my series on Android testing.  This time, I'm going to wade into the huge number of functional testing frameworks that exist.  The differentiation I made between unit testing and functional testing is that the functional tests operate the actual device (as in, you could watch it running through a test).
So Many Frameworks

As you can see in my spreadsheet, there are a ton of functional testing frameworks out there.  I don't have any inclination to test all of them.  Here's what I haven't tried myself, for various reasons:
  • Non-Java - if my code and unit tests are going to be in Java, I might as well make my functional tests in Java as well.
  • Recorder-based testing - While this might be good for a less technical tester, I'd prefer exact control over my tests.
  • Superseded or discontinued - Some frameworks are old and have been surpassed by more modern frameworks.  Others have been discontinued.
This leaves just a few frameworks to investigate.


I was already somewhat familiar with Robotium.  It runs off of the official Android testing framework, but adds the capabilities needed to actually run through an entire app.

It's been around for years, and so it's fairly stable.  It's also straightforward; you use the Solo class to run through your app, one step at a time.  It requires compiling along with the app's source, which could be a negative for some.  Overall, it's a solid functional testing solution.


UiAutomator is a more recent offering from Google.  I found it to be lacking and difficult to use.

First, it depends on more recent APIs, so it can only be used on Jelly Bean and above - you can't use it to test backwards compatibility.  Second, the deployment is more complex than other frameworks.  There's no simple script to put the code you wrote onto a device - you have to write a script yourself because it involves a few dynamic commands (depending on how you named your classes).

Third, it just feels like it's not quite there.  For example, simply launching my app from the test was a struggle.  The suggested start is to begin on your home page then page towards your app to launch it, except the code for doing so is broken.  Instead I had to use some hacky code which used "am start" to launch my Activity.

It does have a few unique advantages.  First, it can be written entirely black-box; you don't need access to the source code.  You use uiautomatorviewer to examine how an app is written and write tests based on that.  Second, it runs on the entire OS, so you can really test cross-app interaction.  If you need either of these, then I might check it out; but for my purposes this is a non-starter.


Espresso is the latest toolkit from Google, and it's so awesome I have to wonder if the reason uiautomator is having issues is because everyone was actually working on Espresso.

It's got a different paradigm from other testing frameworks.  It starts with onView() or onData() with Hamcrest matchers to find your View/AdapterView.  Once found, you can then either perform an action or check some assertions.

The reason for the onView()/onData() setup is that Espresso examines the UI thread to know when processing is done.  A common problem with functional testing on Android is not knowing when a View will show up, so you end up with a lot of sleeps in your tests.  With Espresso you skip all of that, so it's blazing fast!

It's not all sunshine and roses.  It doesn't handle animations well (in fact, the expected setup is to turn all your animations off with dev opts).  I also found initial understanding harder, having to learn how to use Hamcrest to match my Views.  But once I got past those, the testing was so fast and stable that it blew me away.


I had started to try out Appium, as it seemed to present another way of functional testing, but ultimately gave up.

Maybe it was because I tried uiautomator, robotium, and Espresso before getting to Appium, but the setup was just overwhelming.  There was no "hello, world" sample I found that could take me from zero to testing.  There was a lot of documentation I found that listed out about five things I had to install on my machine (and have play together nicely) before I could start.

If my entire job was automation testing, or I knew selenium very well already, then I might consider Appium because then the time investment might pay off.  But as an Android developer who wants to dabble with testing on the side, I don't want to have to deal with getting this environment setup (not to mention the pain I'd be putting others through to replicate my work).


I would take my thoughts with a grain of salt; I haven't used any of these long enough to really get into the nitty gritty.  That said, I think my future functional tests will be written in Espresso; its design paradigm makes for focused, solid testing.  Plus, its basis on the Looper to determine when to continue makes it lightyears faster than the other frameworks could hope to be.  I hope it continues to be supported by Google because I like it.


  1. nice, i like the portability

  2. Hi Daniel, Thanks for those articles. Can I also mention a library of my own that can be used both for unit and functional testing. It's name is BoundBox ( It simply breaks encapsulation for testing, thus allowing to invoke private/protected methods, accessing the inner test of an object to assert the result of a test, accessing elements of UI to manipulate them, and even injecting mocked dependencies.
    Also, Jérôme Van Der Linden and I, have been working on a project to setup many test related technologies : Quality Tools for Android (

  3. Good and Interesting article ... thanks for sharing your valuable information and time for us... keep rocks and sharing...

    Android Training in Chennai

  4. This comment has been removed by the author.


  5. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article. thank you for sharing such a great blog with us.

    angularjs Training in online

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs Training in btm

  6. Thank you for this post. Thats all I are able to say. You most absolutely have built this blog website into something speciel. You clearly know what you are working on, youve insured so many corners.thanks
    online Python certification course | python training in OMR | Python training course in Chennai

  7. Great thoughts you got there, believe I may possibly try just some of it throughout my daily life.
    Devops training in indira-nagar

  8. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
    SEO Training in Chennai
    SEO Training
    SEO Course in Chennai
    SEO Course Chennai
    SEO Training near me

  9. Good Post, I am a big believer in posting comments on sites to let the blog writers know that they ve added something advantageous to the world wide web.
    python training Course in chennai
    python training in Bangalore
    Python training institute in bangalore

  10. In the beginning, I would like to thank you much about this great post. Its very useful and helpful for anyone looking for tips. I like your writing style and I hope you will keep doing this good working.
    Angularjs Classes in Bangalore
    Angularjs Coaching in Bangalore
    Angularjs Institute in Bangalore
    ccna Certification Course in Bangalore
    ccna Certification Training in Bangalore

  11. Thanks for your great and helpful presentation I like your good service. I always appreciate your post. That is very interesting I love reading and I am always searching for informative information like this.AngularJS Training in Chennai | Best AngularJS Training Institute in Chennai

  12. I think things like this are really interesting. I absolutely love to find unique places like this. It really looks super creepy though!!
    machine learning training in chennai
    best training insitute for machine learning
    Android training in Chennai
    PMP training in chennai

  13. I know you feel more happy when you get things done and best of all those things are your most precious treasure.
    Python Online training
    python Training in Chennai
    Python training in Bangalore

  14. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea.
    here by i also want to share this.
    Java training in Bangalore|best Java training in Bangalore
    Java training in Chennai
    Java training in Bangalore
    Java online training
    Java training in Pune

  15. Really nice topics you had discussed above. I am much impressed. Thank you for providing this nice information here.

    Game Testing

    Video Game QA

    IOS Game QA Testing Services

    Game Performance Testing

    Quality Assurance Games

  16. Very nice article. Thank you for nice article and please keep update like this.

    PS4 Game Tester

    Game Testing Services

    Video Game Testing Companies


  17. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you.
    Keep update more information..

    Selenium training in bangalore
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training
    Selenium interview questions and answers

  18. This post is much helpful for us. This is really very massive value to all the readers and it will be the only reason for the post to get popular with great authority
    honor mobile service centre in Chennai
    honor service center near me
    honor service
    honor service centres in chennai
    honor service center velachery
    honor service center in vadapalani

  19. Really nice topics you had discussed above. I am much impressed. Thank you for providing this nice information here

    Software Testing Company

    PS4 Game Tester

    Game Testing Services

    Video Game Testing Companies

  20. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
    Microsoft Azure online training
    Selenium online training
    Java online training
    Python online training
    uipath online training

  21. Great efforts put it to find the list of articles which is very useful to know, Definitely will share the same to other forums.
    big data hadoop training cost in chennai | hadoop training in Chennai | best bigdata hadoop training in chennai | best hadoop certification in Chennai

  22. आपका दिन शुभ रहे। इस तरह के एक दिलचस्प लेख को साझा करने के लिए धन्यवाद!

    lều xông hơi mini

    mua lều xông hơi ở đâu

    lều xông hơi gia đình

    bán lều xông hơi

    xông hơi hồng ngoại

  23. Önskar dig en glad och lycklig ny vecka med din familj och dina nära och kära. Tack för att du delade artikeln

    Giảo cổ lam hòa bình

    hat methi

    hạt methi

    hạt methi ấn độ

  24. This comment has been removed by the author.


  25. Hello friends, nice post and nice urging commented at this place, I am in fact enjoying by these.Regards Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
    Offshore software testing services
    software testing services company
    software testing services
    Software Qa Services
    quality assurance service providers
    Performance testing services
    Security testing services
    software testing Companies

  26. Дээд чанар бол зүгээр л( đá ruby thiên nhiên ) санаатай биш юм. Энэ нь өндөр( Nhẫn đá tourmaline ) түвшний төвлөрөл, тусгай хүчин( Đá Sapphire ) чармайлт, ухаалаг ( đá sapphire hợp mệnh gì )чиг баримжаа, чадварлаг туршлага, ( vòng đá sapphire )саад тотгорыг даван туулах( đá tourmaline đen ) боломжийг хардаг.

  27. nice blog
    get best placement at VSIPL

    digital marketing services
    web development company
    seo network point

  28. your post is very interesting to read. I never stop myself to say something about it. Angular js training in bangalore

  29. Hey Nice Blog!! Thanks For Sharing!!! Wonderful blog & good post. It is really very helpful to me, waiting for a more new post. Keep Blogging!Here is the best angularjs training online training with free Bundle videos .

    contact No :- 9885022027.
    SVR Technologies

  30. Really it was an awesome article,very interesting to read.You have provided an nice article,Thanks for sharing.devops Training in Bangalore

  31. Thank you so much for your information,its very useful and helful to me.Keep updating and sharing. Thank you...
    Selenium Training in Bangalore | Selenium Courses | Selenium Training Institutes - RIA Institute of Technology - Best Selenium Training in Bangalore - Placement oriented Selenium Training Institutes in Bangalore.
    Learn Selenium Testing Training from expert Trainers.

  32. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru ASP.NET Essential Training Online . Nowadays Dot Net has tons of job opportunities on various vertical industry.hadoop training institutes in bangalore

  33. Really very happy to say, your post is very interesting to read. I never stop myself to say something about it.You’re doing a great job. Keep it up...

    Bangalore Training Academy located in Bangalore, is one of the best Workday Training institute with 100% Placement support. Workday Training in Bangalore provided by Workday Certified Experts and real-time Working Professionals with handful years of experience in real time Workday Projects.

  34. Really very happy to say, your post is very interesting to read. I never stop myself to say something about it. You’re doing a great job. Keep it up…

    Advance your career as a SharePoint Admin Engineer by doing SharePoint Admin Courses from Softgen Infotech located @BTM Layout Bangalore.


  35. Great post!I am actually getting ready to across this information,i am very happy to this commands.Also great blog here with all of the valuable information you have.Well done,its a great knowledge.

    sap abap training in bangalore

    sap abap courses in bangalore

    sap abap classes in bangalore

    sap abap course syllabus

    best sap abap training

    sap abap training center

    sap abap training institute in bangalore

  36. Great post!I am actually getting ready to across this information,i am very happy to this commands.Also great blog here with all of the valuable information you have.Well done,its a great knowledge.

    sap hr courses in bangalore

    sap hr classes in bangalore

    sap hr training institute in bangalore

    sap hr course syllabus

    best sap hr training

    sap hr training centers

    sap hr training in bangalore


  37. I finally found great post here.I will get back here. I just added your blog to my bookmark sites. thanks.Quality posts is the crucial to invite the visitors to visit the web page, that's what this web page is providing.
    data analytics courses
    ExcelR Data Science training in Mumbai
    data science interview questions
    ExcelR Business Analytics courses in Mumbai

  38. This post is really nice and informative. The explanation given is really comprehensive and useful.

    amazon web services training in bangalore
    aws tutorial for beginners


  39. Whatever we gathered information from the blogs, we should implement that in practically then only we can understand that exact thing clearly, but it’s no need to do it, because you have explained the concepts very well. It was crystal clear, keep sharing..

    sap fico training videos
    sap fico online training

  40. I'm a learner at Learn Quran Online. Online Quran Teachers offers a variety of Online courses ranging from basic Arabic skills to advance Ijazah mode and more courses. what is the meaning of tajweed

  41. afilmywap This site afilmywap uploads an HD and Low-quality theatre prints on their site or on, Checkout the list of updated movies from filmywap.


  42. That is nice article from you , this is informative stuff . Hope more articles from you . I also want to share some information about openstack online training and websphere portal tutorial

  43. Cinevood provides HD bollywood and Hollywood Hindi movies to watch online for free. domain is sometimes not available ins search results due to some technical errors.

  44. movievilla site is a very famous site in providing HD mobile movies of various languages like Hindi, English, Tamil and Telugu movies.

  45. Good article! I found some useful educational information in your blog about Angular Js, it was awesome to read, thanks for sharing this great content to my vision.
    Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

  46. There are many things mentioned in this article I would not have thought of on my own. This material is inspirational, interesting and it allows the readers to open up their minds to original thinking.
    SAP training in Mumbai
    Best SAP training in Mumbai
    SAP training institute Mumbai

  47. It’s too informative blog and I am getting conglomerations of info’s. Thanks for sharing; I would like to see your updates regularly so keep blogging. If anyone looking car just get here c Software Testing Training in Chennai | Software Testing Training in Anna Nagar | Software Testing Training in OMR | Software Testing Training in Porur | Software Testing Training in Tambaram | Software Testing Training in Velachery

  48. I have recently visited your blog profile. I am totally impressed by your blogging skills and knowledge.

    SAP MM Online Training

    SAP MM Classes Online

    SAP MM Training Online

    Online SAP MM Course

    SAP MM Course Online

  49. playrep, here you can download funrep app free for android and windows

  50. Well written articles like yours renews my faith in today's writers. The article is very informative. Thanks for sharing such beautiful information.

    Selenium Training in Chennai | Certification | Online Courses

    selenium training in chennai

    selenium training in chennai

    selenium online training in chennai

    selenium training in bangalore

    selenium training in hyderabad

    selenium training in coimbatore

    selenium online training

  51. Good article! I found some useful educational information in your blog about Angular Js, it was awesome to read, thanks for sharing this great content to my vision
    AWS training in Chennai

    AWS Online Training in Chennai

    AWS training in Bangalore

    AWS training in Hyderabad

    AWS training in Coimbatore

    AWS training

  52. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.

    Simple Linear Regression

    Correlation vs covariance

    KNN Algorithm

  53. Its a great post. Keep sharing such kind of trustworthy information.
    Thanks for sharing such a nice information. I hope you will share more information like this. keep sharing.

  54. The blog which you have shared is more innovative. Thanks for your information.
    I curious more interest in some of them hope you will give more information on this topics in your next articles.
    Angular js Training in Chennai

    Angular js Training in Velachery

    Angular js Training in Tambaram

    Angular js Training in Porur

    Angular js Training in Omr
    Angular js Training in Annanagar

  55. Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work. amazon web services aws training in chennai

    microsoft azure training in chennai

    workday training in chennai

    android-training-in chennai

    ios training in chennai

  56. blue prism training in Chennai - If you choose to learn the blue prism or automation tool you are supposed to have the programming language. start to learn the blue prism training from the Best Blue prism Training Institute in Chennai.

    uipath training in Chennai - UI path technology is one of the fastest developing fields which has a lot of job opportunities such as software developer, Programmer and lot more. Join the Best Uipath Training Institute in Chennai.

    microsoft azure training in chennai -Microsoft azure technology is growing and soon it will be competitive aws. So students who start to learn Microsoft azure now will be well - paid in the future. Start to learn Microsoft azure training in Chennai.

    Chennai IT Training Center

  57. Your amazing insightful information entails much to me and especially to my ExcelR Data Analytics Courses

  58. Nice Blog !
    Any issue pops up in this acclaimed accounting software can be fixed in the least possible time by our talented professionals at QuickBooks Customer Service Phone Number 1-(855) 550-7546. Our experts are highly skilled and have years of experience in resolving all the issues of QuickBooks. Our number is open 24/7.

  59. Hey! Mind-blowing blog. Keep writing such beautiful blogs. In case you are struggling with issues on QuickBooks software, dial QuickBooks Support Number (877)948-5867. The team, on the other end, will assist you with the best technical services.


  60. Nice and Creative Blog!! I really want to read more content of your blog, please keep posted regularly!!if you are facing any issue in QUICKBOOKS, please visit:

    quickbooks Customer Service

  61. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    Python training in bangalore

  62. Hey! What a wonderful blog. I loved your blog. QuickBooks is the best accounting software, however, it has lots of bugs like QuickBooks Error. To fix such issues, you can contact experts via QuickBooks Customer Service Number

  63. Thanks for sharing such useful information with us. I hope you will share some more info about your blog. Please keep sharing. We will also provide QuickBooks Customer Service for instant help.

  64. ProITacademy is the leading institution offering instructor-led-Job Oriented Courses in Pune. Fresh graduates and working professionals can also enroll in it. ProITacademy offers well-managed Job Oriented Courses in Pune and also provides placement assistance through its industrial training experts the division that interfaces with the global giants hiring Certified Programming Professionals.
    Java Classes in Pune
    Python Classes in

  65. This post is really creative. Thanks for your efforts in blogging it. Really appreciate it.
    It has helped me in improving my skill and now i can easily make use of it. Thanks.
    Data Science Training In Pune

  66. Hey! Nice Blog, I have been using QuickBooks for a long time. One day, I encountered QuickBooks Customer Service in my software, then I called QuickBooks Support Number. They resolved my error in the least possible time.

  67. Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. A debt of gratitude is in order for scientist course in hyderabad

  68. This is excellent information Thank you for sharing it is very helpful for .if you looking solution about accounting service then Dial at

    :QuickBooks Customer Service +1 855-201-8294.our team always stand for help you at this difficult time

  69. Hey! Nice Blog, I have been using QuickBooks for a long time. One day, I encountered QuickBooks Customer Service in my software, then I called QuickBooks Customer Service. They resolved my error in the least possible time.

  70. Hey! What a wonderful blog. I loved your blog. QuickBooks is the best accounting software, however, it has lots of bugs like QuickBooks Error. To fix such issues, you can contact experts via QuickBooks Customer Service (855)963-5959.

  71. Hey! Lovely blog. Your blog contains all the details and information related to the topic. In case you are a QuickBooks user, here is good news for you. You may encounter any error like QuickBooks Error, visit at QuickBooks Customer Service for quick help at (855)963-5959.

  72. The Ceh Training In Jaipur from Cyber Crime Awareness society (CCAS) is truly in demand. The ethical hacking course provides goes in- depth into the techniques used by hackers and demonstrates it in the practical classes. Certified ethical Hacking Certification is the gateway for cyber security domain. Various IT sector companies and MNCs have made CEH certification course compulsory for cyber security job opportunities and this makes the course much in demand. To prevent our students from using these hacking information in bad ways, we also provide the knowledge about cyber laws and guide them to divert the information for the benefits of the society.

  73. Hey! Nice Blog, I have been using QuickBooks for a long time. One day, I encountered QuickBooks Customer Service in my software, then I called QuickBooks Customer Service Number (855)963-5959. They resolved my error in the least possible time.

  74. Hey! Well-written blog. It is the best thing that I have read on the internet today. Moreover, if you are looking for the solution of QuickBooks for MAC Support , visit at QuickBooks Support Phone Number (888)233-6656 to get your issues resolved quickly.

  75. Thank you for sharing this great blog, very true information. Your writing skills are very good, you have to write this kind of blogging
    Salon At Home Noida
    At Home Salon in faridabad
    Waxing Salon At home in Noida
    Beauty Parlour Service at home Gurugram

  76. nice blog. if you are looking forquickbooks customer service you can reach us at.+1 855-444-2233

  77. nice blog. if you are searching for a quickbook customer service you can contact us on call.+1 866-669-5068

  78. Nice & Informative Blog !
    If you are looking for the best accounting software that can help you manage your business operations. call us at QuickBooks support service Phone Number.+1 888-272-4881

  79. Thanks for such a great post and the review, I am totally impressed! Keep stuff like this coming.
    data analytics course in hyderabad

  80. One such service is to call the toll-free number +1 888-698-6548, on weekdays from 9:00am to 6:00pm PST. For more questions, you can also contact them via their website at Quickbooks Customer Service.

  81. Best AWS Training provided by Vepsun in Bangalore for the last 12 years. Our Trainer has more than 20+ Years
    of IT Experience in teaching Virtualization and Cloud topics.. we are very delighted to say that Vepsun is
    the Top AWS cloud training Provider in Bangalore. We provide the best atmosphere for our students to learn.
    Our Trainers have great experience and are highly skilled in IT Professionals. AWS is an evolving cloud
    computing platform provided by Amazon with a combination of IT services. It includes a mixture of
    infrastructure as service and packaged software as service offerings and also automation. We have trained
    more than 10000 students in AWS cloud and our trainer Sameer has been awarded as the best Citrix and Cloud
    trainer in india.

  82. Find the best-fixed mortgage rate in London that works perfectly for you. We make it easy to compare rates in London big banks and top brokers for free. Best mortgage rate in London

  83. Atlantic System is the top point-of-sale system for liquor stores. Atlanticsystem is the most often used pos software for liquor stores.

  84. Excellent Blog news. Thank you so much for sharing.

  85. Excellent article. This was a very interesting essay to read.I'd want to thank you for the time and attention you put into creating this excellent post. This was a very interesting essay to read.I'd want to thank you for the time and attention you put into creating this excellent post.

    Testing tools institute in Hyderabad

  86. Hello Blogger,
    This comprehensive overview of various functional testing frameworks for Android is incredibly helpful for developers looking to delve into testing. The author's clear differentiation between these frameworks and their detailed pros and cons provide valuable insights for choosing the right tool for the job. Thanks for sharing your experiences and recommendations!
    Data Analytics Courses in Nashik

  87. Hey blogger! Your post also highlights the importance of test automation, which is crucial for maintaining test coverage and ensuring the reliability of software. Thanks for sharing valuable information.
    Data Analytics Courses In Chennai

  88. Additionally, your article emphasises the value of test automation, which is essential for preserving test coverage and guaranteeing the dependability of software. I appreciate you sharing this useful information.
    Data Analytics Courses in Agra

  89. His insights and perspectives are not only thought-provoking but also extremely valuable for developers and software engineers.
    Digital marketing courses in illinois

  90. The part-2 on Android testing is very informative and insightful thanks for sharing valuable blog post.
    data analyst courses in limerick

  91. Recoolhair Provide 100% Curly Lace Front Wigs, Highlighted
    , Frontal Lace Wigs, Glueless Wigs, Short Bob Wigs, Colored
    Wigs, Pre Bleached Knots Wig, Air Cap Wig, Loose Deep Wave
    Wigs, Glueless Lace Wig, Hair Bundles with Closure. Free

  92. Great follow-up on Android testing! Excited to dive into the functional testing frameworks. Just like exploring the diverse frameworks, savoring the nuanced layers of شاربونیل شوكلت adds a delightful complexity to the journey!