Automatic fault localization for client‐side JavaScript

Frolin S. Ocariza, Guanpeng Li, Karthik Pattabiraman, Ali Mesbah · Software Testing Verification and Reliability · 2015

Summary JAVASCRIPTis 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 makeJAVASCRIPTcode error‐prone; unfortunately,JAVASCRIPTfault 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 localizeJAVASCRIPTfaults based on dynamic analysis, tracing and backward slicing ofJAVASCRIPTcode. This technique is capable of handling features ofJAVASCRIPTcode that have traditionally been difficult to analyse, includingeval, anonymous functions and minified code. The approach is implemented in an open source tool calledAUTOFLOX, and evaluation results indicate that it is capable of (1) automatically localizing DOM‐relatedJAVASCRIPTfaults with high accuracy (over 96%) and no false‐positives and (2) isolatingJAVASCRIPTfaults in production websites and actual bugs from real‐world web applications. Copyright © 2015 John Wiley & Sons, Ltd.

Read the paper · More papers on PaperTik