Barista: A Technique for Recording, Encoding, and Running Platform Independent Android Tests

Because mobile apps are extremely popular and often mission critical nowadays, companies invest a great deal of resources in testing the apps they provide to their customers. Testing is particularly important for Android apps, which must run on a multitude of devices and operating system versions. Unfortunately, as we confirmed in many interviews with quality assurance professionals, app testing is today a very human intensive, and therefore tedious and error prone, activity. To address this problem, and better support testing of Android apps, we propose a new technique that allows testers to easily create platform independent test scripts for an app and automatically run the generated test scripts on multiple devices and operating system versions. The technique does so without modifying the app under test or the runtime system, by (1) intercepting the interactions of the tester with the app and (2) providing the tester with an intuitive way to specify expected results that it then encode as test oracles. We implemented our technique in a tool named Barista and used the tool to evaluate the practical usefulness and applicability of our approach. Our results show that Barista (1) can faithfully encode user defined test cases as test scripts with built-in oracles that can run on multiple platforms and (2) outperforms two popular tools with similar functionality. Barista and our experimental infrastructure are publicly available.

[1]  Timo Ojala,et al.  Testdroid: automated remote UI testing on Android , 2012, MUM.

[2]  Koushik Sen,et al.  Jalangi: a selective record-replay and dynamic analysis framework for JavaScript , 2013, ESEC/FSE 2013.

[3]  Vijay Janapa Reddi,et al.  Mosaic: cross-platform user-interaction record and replay for the fragmented android ecosystem , 2015, 2015 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS).

[4]  Chen Fu,et al.  Creating GUI Testing Tools Using Accessibility Technologies , 2009, 2009 International Conference on Software Testing, Verification, and Validation Workshops.

[5]  Rob Miller,et al.  Sikuli: using GUI screenshots for search and automation , 2009, UIST '09.

[6]  Todd D. Millstein,et al.  RERAN: Timing- and touch-sensitive record and replay for Android , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[7]  Hrushikesh Zadgaonkar,et al.  Robotium Automated Testing for Android , 2013 .

[8]  Silviu Andrica,et al.  WaRR: A tool for high-fidelity web application record and replay , 2011, 2011 IEEE/IFIP 41st International Conference on Dependable Systems & Networks (DSN).

[9]  Chien-Hung Liu,et al.  Capture-Replay Testing for Android Applications , 2014, 2014 International Symposium on Computer, Consumer and Control.

[10]  Teemu Leivo,et al.  Automating user Interface testing: Case study at Finnish Transport Agency , 2017 .

[11]  Jon Howell,et al.  Mugshot: Deterministic Capture and Replay for JavaScript Applications , 2010, NSDI.

[12]  John Steven,et al.  jRapture: A Capture/Replay tool for observation-based testing , 2000, ISSTA '00.

[13]  Yongjian Hu,et al.  Versatile yet lightweight record-and-replay for Android , 2015, OOPSLA.

[14]  Lauren Darcey,et al.  Advanced Android Application Development , 2014 .

[15]  Karthik Pattabiraman,et al.  DoDOM: Leveraging DOM Invariants for Web 2.0 Application Robustness Testing , 2010, 2010 IEEE 21st International Symposium on Software Reliability Engineering.

[16]  Qun Li,et al.  MobiPlay: A Remote Execution Based Record-and-Replay Tool for Mobile Applications , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[17]  Yuan-Cheng Lai,et al.  Improving the Accuracy of Automated GUI Testing for Embedded Systems , 2014, IEEE Software.

[18]  Yuan-Cheng Lai,et al.  On the Accuracy, Efficiency, and Reusability of Automated Test Oracles for Android Devices , 2014, IEEE Transactions on Software Engineering.

[19]  Michael D. Ernst,et al.  Interactive record/replay for web application debugging , 2013, UIST.