Navigation

Home
Search
Submit A Resource
Contact Us
About Functionn

Subscription Options


Subscribe By Email (265+)


Lists


Archives

May 5, 2012

Author: Hirvesh Posted At: 5/05/2012 Tags: , , , ,

JSCheck - A Specification-Driven Testing Tool For JavaScript

Share:
JSCheck is a testing tool for JavaScript. It was inspired by QuickCheck, a testing tool for Haskell developed by Koen Claessen and John Hughes of Chalmers University of Technology.

JSCheck is a specification-driven testing tool. From a description of the properties of a system, function, or object, it will generate random test cases attempting to prove those properties, and then report its findings. That can be especially effective in managing the evolution of a program because it can show the conformance of new code to old code. It also provides an interesting level of self-documentation, because the executable specifications it relies on can provide a good view of the workings of a program.

The JSCheck program is loaded from the jscheck.js file. It produces a single global variable, JSC, which contains the JSCheck object.

JSCheck is concerned with the specification and checking of claims. (We use the term claim instead of property to avoid confusion with JavaScript's use of property to mean a member of an object.) To create a claim, call JSC.claim, passing in
  • A name, which is a description of the claim
  • A predicate, which is a function that returns true when the claim holds
  • An array of specifiers, which describe the types of the predicate's parameters
  • Optionally, a classifier function that takes the same arguments as the predicate
JSC.claim returns a claim function, which may be passed as an argument to the JSC.check function, which will randomly generate the cases that will attempt to reject the claim. You can set the number of cases generated per claim with the JSC.reps function.

Requirements: None
Demohttp://www.jscheck.org/
License: MIT License

Daily Posts, Be Updated, Subscribe:

Want Free Web Resources? Enter Your Email And We'll Send It To You - Daily! (265+ Subscribers)

Yup, it's that straight forward! Enter your email address below and we'll send you the latest web resources to your inbox, everyday. We don't do spam. Ever.

Trending Posts On Functionn This Week

Share:

Other Interesting Resources:

0 comments:

Post a Comment

 


Recent Posts

Popular Categories



Popular Components



Popular Licenses