Automatic fault localization for client-side JavaScript

作者:Ocariza Frolin S Jr*; Li Guanpeng; Pattabiraman Karthik; Me**ah Ali
来源:Software Testing, Verification and Reliability, 2016, 26(1): 69-88.
DOI:10.1002/stvr.1576

摘要

JAVASCRIPT is a scripting language that plays a prominent role in web applications today. It is dynamic, loosely typed and asynchronous and is extensively used to interact with the Document Object Model (DOM) at runtime. All these characteristics make JAVASCRIPT code error-prone; unfortunately, JAVASCRIPT fault localization remains a tedious and mainly manual task. Despite these challenges, the problem has received very limited research attention. This paper proposes an automated technique to localize JAVASCRIPT faults based on dynamic analysis, tracing and backward slicing of JAVASCRIPT code. This technique is capable of handling features of JAVASCRIPT code that have traditionally been difficult to analyse, including eval, anonymous functions and minified code. The approach is implemented in an open source tool called AUTOFLOX, and evaluation results indicate that it is capable of (1) automatically localizing DOM-related JAVASCRIPT faults with high accuracy (over 96%) and no false-positives and (2) isolating JAVASCRIPT faults in production websites and actual bugs from real-world web applications.

  • 出版日期2016-1