Model-based automated testing of JavaScript Web applications via longer test sequences |
| |
Authors: | Pengfei GAO Yongjie XU Fu SONG Taolue CHEN |
| |
Affiliation: | 1. School of Information Science and Technology, ShanghaiTech University, Shanghai 201210, China2. Department of Computer Science, University of Surrey, Guildford GU2 7XH, UK |
| |
Abstract: | JavaScript has become one of the most widely used languages for Web development. Its dynamic and event-driven features make it challenging to ensure the correctness of Web applications written in JavaScript. A variety of dynamic analysis techniques have been proposed which are, however, limited in either coverage or scalability. In this paper, we propose a simple, yet effective, model-based automated testing approach to achieve a high code-coverage within the time budget via testing with longer event sequences. We implement our approach as an open-source tool LJS, and perform extensive experiments on 21 publicly available benchmarks. On average, LJS is able to achieve 86.5% line coverage in 10 minutes. Compared with JSDEP, a state-of-the-art breadth-first search based automated testing tool enriched with partial order reduction, the coverage of LJS is 11%–19% higher than that of JSDEP on real-world large Web applications. Our empirical findings support that proper longer test sequences can achieve a higher code coverage in JavaScript Web application testing. |
| |
Keywords: | model-based testing automated testing JavaScript Web applications |
|
| 点击此处可从《Frontiers of Computer Science》浏览原始摘要信息 |
|
点击此处可从《Frontiers of Computer Science》下载全文 |
|