A Hybrid Approach for Reverse Engineering GUI Model from Android Apps for Automated Testing
Keywords:Graphical User Interface Testing, Mobile Application, Reverse Engineering, Test Automation,
AbstractNowadays, smartphone users are increasingly relying on mobile applications to complete most of their daily tasks. As such, mobile applications are becoming more and more complex. Therefore, software testers can no longer rely on manual testing methods to test mobile applications. Automated model-based testing techniques are recently used to test mobile applications. However, the models generated by existing techniques are of insufficient quality. This paper proposed a hybrid technique for reverse engineering graphical user interface (GUI) model from mobile applications. It performs static analysis of application’s bytecode to extract GUI information followed by a dynamic crawling to systematically explore and reverse engineer a model of the application under test. A case study was performed on real-world mobile apps to evaluate the effectiveness of the technique. The results showed that the proposed technique can generate a model with high coverage of mobile apps behaviour.
F. Nayebi, J.-M. Desharnais, and A. Abran, “The state of the art of mobile application usability evaluation,” in 2012 25th IEEE Canadian Conference on Electrical and Computer Engineering (CCECE), 2012, pp. 1-4.
R. Islam, R. Islam, and T. Mazumder, “Mobile application and its global impact,” International Journal of Engineering & Technology IJET-IJENS, vol. 10, no. 6, pp. 72-78, 2010.
R. Minelli and M. Lanza, “Software Analytics for Mobile ApplicationsInsights & Lessons Learned,” in 2013 17th European Conference on Software Maintenance and Reengineering, 2013, pp. 144-153.
C. Hu and I. Neamtiu, “Automating GUI testing for Android applications,” in Proceedings of the 6th International Workshop on Automation of Software Test, 2011, pp. 77-83.
P. Bhattacharya, L. Ulanova, I. Neamtiu, and S. C. Koduru, “An empirical analysis of bug reports and bug fixing in open source android apps,” in 17th European Conference on Software Maintenance and Reengineering (CSMR), 2013, pp. 133-143.
W. Enck, P. Gilbert, B.-G. Chun, L. P. Cox, J. Jung, P. McDaniel, and A. N. Sheth, “TaintDroid: an information-flow tracking system for realtime privacy monitoring on smartphones,” in OSDI’10 Proceedings of the 9th USENIX Conference on Operating Systems Design and Implementation, 2010, pp. 393-407.
A. Rountev and D. Yan, “Static reference analysis for GUI objects in android software,” in CGO’14 Proceedings of Annual IEEE/ACM International Symposium on Code Generation and Optimization, Orlando, FL, USA, 2014, pp. 143.
T. Azim and I. Neamtiu, “Targeted and depth-first exploration for systematic testing of android apps,” in Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, 2013, pp. 641-660.
W. Yang, M. R. Prasad, and T. Xie, “A grey-box approach for automated GUI-model generation of mobile applications,” inFundamental Approaches to Software Engineering, V. Cortellessa, and D. Varró, Eds. Berlin Heidelberg: Springer, 2013, pp. 250-265.
S. Yang, D. Yan, H. Wu, Y. Wang, and A. Rountev, “Static controlflow analysis of user-driven callbacks in android applications,” in 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, 2015, pp. 89-99.
A. P. Grilo, A. R. Paiva, and J. P. Faria, “Reverse engineering of GUI models for testing,” in 2010 5th Iberian Conference on Information Systems and Technologies (CISTI), 2010, pp. 1-6.
D. Amalfitano, A. R. Fasolino, and P. Tramontana, “A GUI crawlingbased technique for android mobile application testing,” in 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops (ICSTW), 2011, pp. 252-261.
B. Nguyen, B. Robbins, I. Banerjee, and A. Memon, “GUITAR: An innovative tool for automated testing of GUI-driven software,” Automated Software Engineering, vol. 21, no. 1, pp. 65-105, 2014.
A. Méndez-Porras, C. Quesada-López, and M. Jenkins, “Automated testing of mobile applications: A systematic map and review,” in XVIII Ibero-American Conference on Software Engineering, Lima-Peru, 2015, pp. 195-208.
S. R. Choudhary, A. Gorla, and A. Orso, “Automated test input generation for android: Are we there yet? (E),” in ASE '15 Proceedings of the 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE), 2015, pp. 429-440.
G. de Cleva Farto and A. T. Endo, “Evaluating the model-based testing approach in the context of mobile applications,” Electronic Notes in Theoretical Computer Science, vol. 314, pp. 3-21, 2015.
M. Young, Software Testing and Analysis: Process, Principles, and Techniques. John Wiley & Sons, 2008.
I. Banerjee, B. Nguyen, V. Garousi, and A. Memon, “Graphical user interface (GUI) testing: Systematic mapping and repository,” Information and Software Technology, vol. 55, no. 10, pp. 1679-1694, 2013.
L. Lu and Y. Huang, “Automated GUI test case generation,” in 2012 International Conference on Computer Science & Service System (CSSS) , 2012, pp. 582-585.
P. Aho, M. Suarez, A. Memon, and T. Kanstrén, “Making GUI testing practical: Bridging the gaps,” in 2015 12th International Conference on Information Technology - New Generations (ITNG), 2015, pp. 439- 444.
A. Kull, “Automatic GUI model generation: State of the art,” in 2012 IEEE 23rd International Symposium on Software Reliability Engineering Workshops (ISSREW), 2012, pp. 207-212.
M. Utting and B. Legeard, Practical Model-Based Testing: A Tools Approach. Morgan Kaufmann, 2010.
A. M. Memon, “An event-flow model of GUI-based applications for testing,” Software Testing Verification and Reliability, vol. 17, no. 3, pp. 137-158, 2007.
D. Amalfitano, A. R. Fasolino, P. Tramontana, S. D. Carmine, and A. M. Memon, “Using GUI ripping for automated testing of android applications,” in 012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering, Essen, Germany, 2012, pp. 258-261.
T. Cipresso and M. Stamp, “Software reverse engineering,” in Handbook of Information and Communication Security, P. Stavroulakis, and M. Stamp, Eds. Springer, 2010, pp. 659-696.
E. Stroulia, M. El-Ramly, P. Iglinski, and P. Sorenson, “User interface reverse engineering in support of interface migration to the web,” Automated Software Engineering, vol. 10, no. 3, pp. 271-301, 2003.
G. Canfora, M. D. Penta, and L. Cerulo, “Achievements and challenges in software reverse engineering,” Communications of the ACM, vol. 54, no. 4, pp. 142-151, 2011.
J. Krijnen, “Software reverse engineering,” 2013. Available at https://pdfs.semanticscholar.org/41f7/8442ab7032ec90f2890c99a2ac8 435bad924.pdf
J. C. Campos, J. Saraiva, C. Silva, and J. C. Silva, “GUIsurfer: A reverse engineering framework for user interface software,” Reverse Engineering-Recent Advances and Applications, pp. 31-54, 2012.
M. M. Moore, “Rule-based detection for reverse engineering user interfaces,” in Proceedings of the Third Working Conference on Reverse Engineering 1996, 1996, pp. 42-48.
C. E. Silva and J. C. Campos, “Combining static and dynamic analysis for the reverse engineering of web applications,” in EICS '13 Proceedings of the 5th ACM SIGCHI Symposium on Engineering Interactive Computing Systems, London, United Kingdom, 2013, pp. 107-112.
P. Aho, T. Raty, and N. Menz, “Dynamic reverse engineering of GUI models for testing,” in 2013 International Conference on Control, Decision and Information Technologies (CoDIT), 2013, pp. 441-447.
P. Aho, M. Suarez, T. Kanstren, and A. M. Memon, “Murphy tools: Utilizing extracted gui models for industrial software testing,” in 2014 IEEE Seventh International Conference on Software Testing, Verification and Validation Workshops (ICSTW) , 2014, pp. 343-348.
I. C. Morgado, A. C. Paiva, and J. P. Faria, “Dynamic reverse engineering of graphical user interfaces,” International Journal On Advances in Software, vol. 5, no. 3 and 4, pp. 224-236, 2012.
S. Yang, D. Yan, and A. Rountev, “Testing for poor responsiveness in android applications,” in 2013 1st International Workshop on the Engineering of Mobile-Enabled Systems (MOBS) , 2013, pp. 1-6.
C. Tao and J. Gao, “Building a model-based GUI test automation system for mobile applications,” International Journal of Software Engineering and Knowledge Engineering, vol. 26, no. 09n10, pp. 1605- 1615, 2016.
S. Yang, H. Zhang, H. Wu, Y. Wang, D. Yan, and A. Rountev, “GATOR: Program analysis toolkit for android,” 2016, Available at http://web.cse.ohio-state.edu/presto/software/gator/.
U. Apache, “Robotium,” Available at http://code.google.com/p/robotium.
M. E. Joorabchi and A. Mesbah, “Reverse engineering iOS mobile applications,” in 2012 19th Working Conference on Reverse Engineering (WCRE), 2012, pp. 177-186.
R. J. Jacob, “Using formal specifications in the design of a humancomputer interface,” Communications of the ACM, vol. 26, no. 4, pp. 259-264, 1983.
“Android GUITAR,” Available at https://sourceforge.net/projects/guitar/.
D. Amalfitano, A. R. Fasolino, P. Tramontana, S. De Carmine, and G. Imparato, “A toolset for GUI testing of android applications,” in 2012 28th IEEE International Conference on Software Maintenance (ICSM), 2012, pp. 650-653.
S. Salva, P. Laurençot, and S. R. Zafimiharisoa, “Model inference of mobile applications with dynamic state abstraction,” in Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing 2015, 2016, pp. 177-193.
How to Cite
TRANSFER OF COPYRIGHT AGREEMENT
The manuscript is herewith submitted for publication in the Journal of Telecommunication, Electronic and Computer Engineering (JTEC). It has not been published before, and it is not under consideration for publication in any other journals. It contains no material that is scandalous, obscene, libelous or otherwise contrary to law. When the manuscript is accepted for publication, I, as the author, hereby agree to transfer to JTEC, all rights including those pertaining to electronic forms and transmissions, under existing copyright laws, except for the following, which the author(s) specifically retain(s):
- All proprietary right other than copyright, such as patent rights
- The right to make further copies of all or part of the published article for my use in classroom teaching
- The right to reuse all or part of this manuscript in a compilation of my own works or in a textbook of which I am the author; and
- The right to make copies of the published work for internal distribution within the institution that employs me
I agree that copies made under these circumstances will continue to carry the copyright notice that appears in the original published work. I agree to inform my co-authors, if any, of the above terms. I certify that I have obtained written permission for the use of text, tables, and/or illustrations from any copyrighted source(s), and I agree to supply such written permission(s) to JTEC upon request.