Metamorphic Testing of Navigation Software: a Pilot Study with Google Maps
Total Page:16
File Type:pdf, Size:1020Kb
University of Wollongong Research Online Faculty of Engineering and Information Faculty of Engineering and Information Sciences - Papers: Part B Sciences 2018 Metamorphic testing of navigation software: A pilot study with Google Maps Joshua Brown University of Wollongong, [email protected] Zhiquan Zhou University of Wollongong, [email protected] Yang-Wai Chow University of Wollongong, [email protected] Follow this and additional works at: https://ro.uow.edu.au/eispapers1 Part of the Engineering Commons, and the Science and Technology Studies Commons Recommended Citation Brown, Joshua; Zhou, Zhiquan; and Chow, Yang-Wai, "Metamorphic testing of navigation software: A pilot study with Google Maps" (2018). Faculty of Engineering and Information Sciences - Papers: Part B. 1347. https://ro.uow.edu.au/eispapers1/1347 Research Online is the open access institutional repository for the University of Wollongong. For further information contact the UOW Library: [email protected] Metamorphic testing of navigation software: A pilot study with Google Maps Abstract Millions of people use navigation software every day to commute and travel. In addition, many systems rely upon the correctness of navigation software to function, ranging from directions applications to self- driving machinery. Navigation software is difficulto t test because it is hard or very expensive to evaluate its output. This difficulty is generally known as the oracle problem, a fundamental challenge in software testing. In this study, we propose a metamorphic testing strategy to alleviate the oracle problem in testing navigation software, and conduct a case study by testing the Google Maps mobile app, its web service API, and its graphical user interface. The results show that our strategy is effective with the detection of several real-life bugs in Google Maps. This study is the first work on automated testing of navigation software with the detection of real-life bugs. Keywords google, metamorphic, maps, testing, navigation, software:, pilot, study Disciplines Engineering | Science and Technology Studies Publication Details Brown, J., Zhou, Z. & Chow, Y. (2018). Metamorphic testing of navigation software: A pilot study with Google Maps. Proceedings of the 51st Annual Hawaii International Conference on System Sciences (HICSS-51) (pp. 5687-5696). AIS. 2018 This conference paper is available at Research Online: https://ro.uow.edu.au/eispapers1/1347 Metamorphic Testing of Navigation Software: A Pilot Study with Google Maps Joshua Brown, Zhi Quan Zhou£, and Yang-Wai Chow Institute of Cybersecurity and Cryptology School of Computing and Information Technology University of Wollongong Wollongong, NSW 2522, Australia Abstract—Millions of people use navigation software every day exceed 50% of the total development budget. Testing in- to commute and travel. In addition, many systems rely upon the volves executing the software under test (SUT) with a set of correctness of navigation software to function, ranging from test cases together with a mechanism against which the tester directions applications to self-driving machinery. Navigation can decide whether the outcomes of test case executions are software is difficult to test because it is hard or very expensive correct (that is, a test oracle). The oracle problem refers to evaluate its output. This difficulty is generally known as the to the situation where an oracle does not exist or it is oracle problem, a fundamental challenge in software testing. theoretically available but practically too expensive to be In this study, we propose a metamorphic testing strategy to applied. The oracle problem is a fundamental challenge in alleviate the oracle problem in testing navigation software, and software testing practice but this problem is often ignored conduct a case study by testing the Google Maps mobile app, its by the research community — compared with many other web service API, and its graphical user interface. The results aspects of testing such as automated test case generation, show that our strategy is effective with the detection of several the challenge of test oracle automation “has received signif- real-life bugs in Google Maps. This study is the first work on icantly less attention, and remains comparatively less well- automated testing of navigation software with the detection of solved” [3]. real-life bugs. There is a severe oracle problem when testing navigation Keywords: Mobile navigation software, Google Maps, di- software. This is because the real-world road networks are rections API, Web service, Graphical User Interface, software so complex that in most situations it is infeasible to validate whether or not a route returned by the navigation software testing, oracle problem, metamorphic testing, verification, val- is correct and optimal, except trivial cases. This difficulty idation. results in a scenario where developers cannot utilize con- ventional testing techniques. In fact, there has been little 1. Introduction research on automated testing of navigation software in the literature. A related study was conducted by Wright et al. The road network is a vast and complex system of [4], where they manually evaluated the position accuracy interconnecting roads and intersections which are extended and measurement accuracy (driving distance) computed by through the use of external services such as a road-ferry. In GPS receivers against a local area road map. the world, there are over 64 million kilometres of road [1] A growing body of research and industrial application and it continues to grow and change every day. Navigation has investigated the concept of metamorphic testing (MT) software is designed to plan an optimal route between two [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], and has points within the constraints it has been passed; the route proven MT to be a highly effective testing paradigm for contains the directions that the user should follow to reach the detection of real-life software faults in the absence of the destination. Navigation systems are one of the most an ideal test oracle. The idea of MT is simple: Instead of popular applications on the Internet, and on smart phones. focusing on the correctness of each individual output, MT They are the most popular application installed on over looks at the relationships among the inputs and outputs of 50% of the global smart phone market [2]. Furthermore, multiple executions of the SUT. Such relationships are called these systems are mission critical applications, as their metamorphic relations (MRs), and are necessary properties failure could potentially cause traffic accidents, especially of the intended software’s functionality. For example, when when they are used for the navigation of self-driving cars. testing a web search engine, it is very hard for testers Navigation systems, therefore, must be thoroughly verified to assess the quality of the search results, such as their and validated. accuracy and completeness [8]. Nevertheless, MT can be To verify and validate software systems, testing is es- applied by identifying the following metamorphic relation: sential. It is widely accepted that, in a typical commercial A stable search engine should return similar results for sim- software development project, the cost of testing can easily ilar queries. For instance, although a search for [ today’s £Corresponding author. Email: [email protected]. Telephone: (+61-2) movies in Honolulu ] and a search for [ Honolulu 4221 5399. movies today ] may return different results, the two sets of search results should have a large intersection if the validation: The vast majority of users do not have access search engine under test is robust [8]. Because MT looks to the detailed algorithm designs and system/subsystem at the relationships among multiple SUT executions instead specifications of the navigation software they are using. of focusing on the verification of each individual output, it Without access to these specifications, the user manual or can be performed in the absence of an ideal oracle, hence online help pages are the only type of information source alleviating the oracle problem. available to the users. However, as pointed out by Zhou et al. Although the basic concept of MT is simple, it requires [8], user manuals or online help pages are usually very brief specific study when applied to different application domains and are not equivalent to the system specification defined as [9]. This is because different application areas can have “an adequate guide to building a product that will fulfill its different properties of interest to investigate. The present goals” [15]. Consequently, it is basically impossible for users paper proposes applying MT to test navigation software to evaluate the navigation system they are using against its in order to alleviate the oracle problem in testing such technical specifications or the intended algorithms. systems. A case study has been conducted with Google Zhou et al. [8] pointed out that the above phenomenon Maps, including the testing of its mobile applications, its can be quite common when testing many types of software web service APIs (namely, the Directions API), as well as its applications such as web services, poorly evolved software, Graphical User Interface (GUI) at maps.google.com. Google and open source software, and showed that MT can be an Maps was selected for the case study because it is the most effective approach to addressing these difficulties caused by popular mapping system by far [2]