Contract-driven testing of javascript code

  • Authors:
  • Phillip Heidegger;Peter Thiemann

  • Affiliations:
  • Albert-Ludwigs, Universität Freiburg, Germany;Albert-Ludwigs, Universität Freiburg, Germany

  • Venue:
  • TOOLS'10 Proceedings of the 48th international conference on Objects, models, components, patterns
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

JSConTest is a tool that enhances JavaScript with simple, type-like contracts and provides a framework for monitoring and guided random testing of programs against these contracts at the same time. Function contracts in JSConTest serve a dual role as specifications of the input/output behavior and as test case generators. Generation of test data for a contract is generally random, but it can be guided by annotations on the contract to achieve higher coverage. Annotations may indicate dependencies among parameters and the result or they may select lightweight program analyses, the results of which influence the choice of test data. A case study substantiates that JSConTest finds type-related errors with high probability.