A Framework for Automated Testing of JavaScript Web Applications

Shay Artzi, Julian Dolby, Simon Holm Jensen, Anders Møller, Frank Tip

    Research output: Contribution to book/anthology/report/proceedingArticle in proceedingsResearchpeer-review

    171 Citations (Scopus)

    Abstract

    Current practice in testing JavaScript web applications requires manual construction of test cases, which is difficult and tedious. We present a framework for feedback-directed automated test generation for JavaScript in which execution is monitored to collect information that directs the test generator towards inputs that yield increased coverage. We implemented several instantiations of the framework, corresponding to variations on feedback-directed random testing, in a tool called Artemis. Experiments on a suite of JavaScript applications demonstrate that a simple instantiation of the framework that uses event handler registrations as feedback information produces surprisingly good coverage if enough tests are generated. By also using coverage information and read-write sets as feedback information, a slightly better level of coverage can be achieved, and sometimes with many fewer tests. The generated tests can be used for detecting HTML validity problems and other programming errors.
    Original languageEnglish
    Title of host publicationProceeding of the 33rd International Conference on Software Engineering
    Number of pages10
    PublisherAssociation for Computing Machinery
    Publication date2011
    Pages571-580
    ISBN (Print)978-1-4503-0445-0
    DOIs
    Publication statusPublished - 2011
    Event33rd International Conference on Software Engineering (ICSE 2011) -
    Duration: 17 Dec 2010 → …

    Conference

    Conference33rd International Conference on Software Engineering (ICSE 2011)
    Period17/12/2010 → …

    Fingerprint

    Dive into the research topics of 'A Framework for Automated Testing of JavaScript Web Applications'. Together they form a unique fingerprint.

    Cite this