skip to main content
10.1145/3213846.3213869acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article

Automatically translating bug reports into test cases for mobile apps

Published: 12 July 2018 Publication History

Abstract

When users experience a software failure, they have the option of submitting a bug report and provide information about the failure and how it happened. If the bug report contains enough information, developers can then try to recreate the issue and investigate it, so as to eliminate its causes. Unfortunately, the number of bug reports filed by users is typically large, and the tasks of analyzing bug reports and reproducing the issues described therein can be extremely time consuming. To help make this process more efficient, in this paper we propose Yakusu, a technique that uses a combination of program analysis and natural language processing techniques to generate executable test cases from bug reports. We implemented Yakusu for Android apps and performed an empirical evaluation on a set of over 60 real bug reports for different real-world apps. Overall, our technique was successful in 59.7% of the cases; that is, for a majority of the bug reports, developers would not have to study the report to reproduce the issue described and could simply use the test cases automatically generated by Yakusu. Furthermore, in many of the remaining cases, Yakusu was unsuccessful due to limitations that can be addressed in future work.

References

[1]
0nko. 2017. Notification icon: App crash when publishing a post. Retrieved June 8, 2018 from https://github.com/wordpress-mobile/WordPress-Android/issues/5497
[2]
Gabor Angeli, Melvin Jose Johnson Premkumar, and Christopher D. Manning. 2015. Leveraging Linguistic Structure For Open Domain Information Extraction. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing. The Association for Computer Linguistics, Stroudsburg, PA, USA, 344–354.
[3]
Shay Artzi, Sunghun Kim, and Michael D. Ernst. 2008. ReCrash: Making Software Failures Reproducible by Preserving Object States. In 22nd European Conference on Object-Oriented Programming. Springer, Berlin, Heidelberg, 542–565.
[4]
Nicolas Bettenburg, Sascha Just, Adrian Schröter, Cathrin Weiss, Rahul Premraj, and Thomas Zimmermann. 2008. What Makes a Good Bug Report?. In Proceedings of the 16th ACM SIGSOFT International Symposium on Foundations of Software Engineering. ACM, New York, NY, USA, 308–318.
[5]
S. R. K. Branavan, Harr Chen, Luke S. Zettlemoyer, and Regina Barzilay. 2009. Reinforcement Learning for Mapping Instructions to Actions. In Proceedings of the 47th Annual Meeting of the Association for Computational Linguistics and the 4th International Joint Conference on Natural Language Processing of the AFNLP. The Association for Computer Linguistics, Stroudsburg, PA, USA, 82–90.
[6]
Bullnados. 2017. Main and Nightly Version crashing all time on LG G4. Retrieved June 8, 2018 from https://github.com/nextcloud/android/issues/760
[7]
Cohan Sujay Carlos. 2011. Natural Language Programming Using Class Sequential Rules. In Proceedings of the Fifth International Joint Conference on Natural Language Processing. The Association for Computer Linguistics, Stroudsburg, PA, USA, 237–245.
[8]
Wontae Choi, George Necula, and Koushik Sen. 2013. Guided GUI Testing of Android Apps with Minimal Restart and Approximate Learning. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications. ACM, New York, NY, USA, 623–640.
[9]
Pedro Costa, Ana C. R. Paiva, and Miguel Nabuco. 2014. Pattern Based GUI Testing for Mobile Applications. In 2014 9th International Conference on the Quality of Information and Communications Technology. IEEE Computer Society, Washington, DC, USA, 66–74.
[10]
Anthony Cozzie, Murph Finnicum, and Samuel T. King. 2011. Macho: Programming with Man Pages. In 13th Workshop on Hot Topics in Operating Systems. USENIX Association, Napa, CA, United States.
[11]
Marie-Catherine de Marneffe, Bill MacCartney, and Christopher D. Manning. 2006. Generating Typed Dependency Parses from Phrase Structure Parses. In Proceedings of the Fifth International Conference on Language Resources and Evaluation. European Language Resources Association (ELRA), Genoa, Italy, 449–454.
[12]
Aditya Desai, Sumit Gulwani, Vineet Hingorani, Nidhi Jain, Amey Karkare, Mark Marron, Sailesh R., and Subhajit Roy. 2016. Program Synthesis Using Natural Language. In Proceedings of the 38th International Conference on Software Engineering. ACM, New York, NY, USA, 345–356.
[13]
Mattia Fazzini, Martin Prammer, Marcelo d’Amorim, and Alessandro Orso. 2018. Yakusu. Retrieved June 8, 2018 from http://www.cc.gatech.edu/~orso/software/ yakusu
[14]
GitHub 2018. GitHub. Retrieved June 8, 2018 from https://github.com
[15]
GitHub 2018. Manually creating a single issue template for your repository. Retrieved June 8, 2018 from https://help.github.com/articles/ manually-creating-a-single-issue-template-for-your-repository
[16]
Alberto Goffi, Alessandra Gorla, Michael D. Ernst, and Mauro Pezzè. 2016. Automatic Generation of Oracles for Exceptional Behaviors. In Proceedings of the 25th International Symposium on Software Testing and Analysis. ACM, New York, NY, USA, 213–224.
[17]
Google 2018. Custom View Components. Retrieved June 8, 2018 from https: //developer.android.com/training/custom-views/index.html
[18]
Google 2018. Espresso. Retrieved June 8, 2018 from https://developer.android. com/training/testing/espresso/index.html
[19]
Google 2018. Google News Vectors Negative 300. Retrieved June 8, 2018 from https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM
[20]
Google 2018. Reporting Bugs. Retrieved June 8, 2018 from https://source.android. com/setup/report-bugs
[21]
Tihomir Gvero and Viktor Kuncak. 2015. Synthesizing Java Expressions from Freeform Queries. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, New York, NY, USA, 416–432.
[22]
Wei Jin and Alessandro Orso. 2012. BugRedux: Reproducing Field Failures for Inhouse Debugging. In Proceedings of the 34th International Conference on Software Engineering. IEEE Computer Society, Washington, DC, USA, 474–484.
[23]
Wei Jin and Alessandro Orso. 2013. F3: Fault Localization for Field Failures. In Proceedings of the 2013 International Symposium on Software Testing and Analysis. ACM, New York, NY, USA, 213–223.
[24]
JSON 2018. Introducing JSON. Retrieved June 8, 2018 from https://www.json.org
[25]
Dan Jurafsky and James H Martin. 2014. Speech and language processing. Pearson Education, London, UK.
[26]
Mathias Landhäußer, Sebastian Weigelt, and Walter F. Tichy. 2017. NLCI: a Natural Language Command Interpreter. Automated Software Engineering 24 (2017), 839–861.
[27]
Tessa A. Lau, Clemens Drews, and Jeffrey Nichols. 2009. Interpreting Written How-To Instructions. In Proceedings of the 21st International Joint Conference on Artificial Intelligence. AAAI Press, Bellevue, Washington, USA, 1433–1438.
[28]
Vu Le, Sumit Gulwani, and Zhendong Su. 2013. SmartSynth: Synthesizing Smartphone Automation Scripts from Natural Language. In Proceeding of the 11th Annual International Conference on Mobile Systems, Applications, and Services. ACM, New York, NY, USA, 193–206.
[29]
Dennis Lee. 2016. How to write a bug report that will make your engineers love you. Retrieved June 8, 2018 from https://testlio.com/blog/the-ideal-bug-report
[30]
Christopher D. Manning, Mihai Surdeanu, John Bauer, Jenny Finkel, Steven J. Bethard, and David McClosky. 2014. The Stanford CoreNLP Natural Language Processing Toolkit. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics. The Association for Computer Linguistics, Stroudsburg, PA, USA, 55–60.
[31]
Mehdi Hafezi Manshadi, Daniel Gildea, and James F. Allen. 2013. Integrating Programming by Example and Natural Language Programming. In Proceedings of the Twenty-Seventh AAAI Conference on Artificial Intelligence. AAAI Press, Bellevue, Washington, USA, 661–667.
[32]
Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Efficient Estimation of Word Representations in Vector Space. CoRR abs/1301.3781 (2013).
[33]
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013. Distributed Representations of Words and Phrases and Their Compositionality. In Advances in Neural Information Processing Systems 26: 27th Annual Conference on Neural Information Processing Systems 2013. Curran Associates Inc., Lake Tahoe, Nevada, USA, 3111–3119.
[34]
Gary Miner, John Elder, Thomas Hill, Robert Nisbet, Dursun Delen, and Andrew Fast. 2012. Practical Text Mining and Statistical Analysis for Non-structured Text Data Applications. Academic Press, Orlando, FL, USA.
[35]
Chris Moody. 2015. A Word is Worth a Thousand Vectors. Retrieved June 8, 2018 from https://multithreaded.stitchfix.com/blog/2015/03/11/ word-is-worth-a-thousand-vectors
[36]
Rodrigo M. L. M. Moreira, Ana C. R. Paiva, and Atif Memon. 2013. A Pattern-Based Approach for GUI Modeling and Testing. In 2013 IEEE 24th International Symposium on Software Reliability Engineering (ISSRE). IEEE Computer Society, Washington, DC, USA, 288–297.
[37]
Ines Coimbra Morgado and Ana C. R. Paiva. 2015. Testing Approach for Mobile Applications through Reverse Engineering of UI Patterns. In 2015 30th IEEE/ACM International Conference on Automated Software Engineering Workshop (ASEW). IEEE Computer Society, Washington, DC, USA, 42–49.
[38]
Satish Narayanasamy, Gilles Pokam, and Brad Calder. 2005. BugNet: Continuously Recording Program Execution for Deterministic Replay Debugging. In 32nd International Symposium on Computer Architecture. IEEE Computer Society, Washington, DC, USA, 284–295.
[39]
Mathieu Nayrolles, Abdelwahab Hamou-Lhadj, Sofiène Tahar, and Alf Larsson. 2015. JCHARMING: A Bug Reproduction Approach Using Crash Traces and Directed Model Checking. In 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER). IEEE Computer Society, Washington, DC, USA, 101–110.
[40]
Jason Ostrander. 2012. Android UI Fundamentals: Develop and Design. Peachpit Press, Berkeley, CA, USA.
[41]
Mukund Raghothaman, Yi Wei, and Youssef Hamadi. 2016. SWIM: Synthesizing What I Mean: Code Search and Idiomatic Snippet Synthesis. In Proceedings of the 38th International Conference on Software Engineering. ACM, New York, NY, USA, 357–367.
[42]
Atanas Rountev and Dacong Yan. 2014. Static Reference Analysis for GUI Objects in Android Software. In Proceedings of Annual IEEE/ACM International Symposium on Code Generation and Optimization. ACM, New York, NY, USA, 143–153.
[43]
Clara Sacramento and Ana C. R. Paiva. 2014. Web Application Model Generation through Reverse Engineering and UI Pattern Inferring. In 2014 9th International Conference on the Quality of Information and Communications Technology. IEEE Computer Society, Washington, DC, USA, 105–115.
[44]
John Saito. 2016. Making a case for letter case. Retrieved June 8, 2018 from https://medium.com/@jsaito/making-a-case-for-letter-case-19d09f653c98
[45]
Square 2018. JavaPoet. Retrieved June 8, 2018 from https://github.com/square/ javapoet
[46]
John Steven, Pravir Chandra, Bob Fleck, and Andy Podgurski. 2000. jRapture: A Capture/Replay Tool for Observation-based Testing. In Proceedings of the International Symposium on Software Testing and Analysis. ACM, New York, NY, USA, 158–167.
[47]
Suresh Thummalapenta, Saurabh Sinha, Nimit Singhania, and Satish Chandra. 2012. Automating Test Automation. In Proceedings of the 34th International Conference on Software Engineering. IEEE Computer Society, Washington, DC, USA, 881–891.
[48]
Universal Dependencies 2018. Universal Dependencies. Retrieved June 8, 2018 from http://universaldependencies.org ISSTA’18, July 16–21, 2018, Amsterdam, Netherlands Mattia Fazzini, Martin Prammer, Marcelo d’Amorim, and Alessandro Orso
[49]
David Vadas and James R. Curran. 2005. Programming With Unrestricted Natural Language. In Proceedings of the Australasian Language Technology Workshop. Australasian Language Technology Association, Sydney, Australia, 191–199.
[50]
Radim Řehůřek. 2018. Gensim. Retrieved June 8, 2018 from https://radimrehurek. com/gensim
[51]
WordPress 2018. WordPress. Retrieved June 8, 2018 from https://play.google. com/store/apps/details?id=org.wordpress.android
[52]
Shengqian Yang, Hailong Zhang, Haowei Wu, Yan Wang, Dacong Yan, and Atanas Rountev. 2015. Static Window Transition Graphs for Android (T). In 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE Computer Society, Washington, DC, USA, 658–668.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISSTA 2018: Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis
July 2018
379 pages
ISBN:9781450356992
DOI:10.1145/3213846
  • General Chair:
  • Frank Tip,
  • Program Chair:
  • Eric Bodden
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 July 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Mobile testing and debugging
  2. natural language processing

Qualifiers

  • Research-article

Conference

ISSTA '18
Sponsor:

Acceptance Rates

Overall Acceptance Rate 58 of 213 submissions, 27%

Upcoming Conference

ISSTA '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)56
  • Downloads (Last 6 weeks)9
Reflects downloads up to 06 Nov 2024

Other Metrics

Citations

Cited By

View all

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media