500 likes | 1.74k Views
Jasmine Testing Framework. What’s Jasmine For?. Framework for Test Driven Development Designed around acceptance testing Works in any environment (with or without browser, etc.). What does Jasmine look like?. How do I use Jasmine?. First: define your behavior Example: Citadel Trivia App
E N D
What’s Jasmine For? • Framework for Test Driven Development • Designed around acceptance testing • Works in any environment (with or without browser, etc.)
How do I use Jasmine? • First: define your behavior • Example: Citadel Trivia App • Should provide information about the citadel • Should be location aware • Second: define your interface • Example: Citadel Trivia App • HTML5 Page • Three important elements: title div, content div and update button • Clicking the update button should put information in the two divs • The information should change if the user is in a new area
How do I get started? • Go to http://pivotal.github.io/jasmine/ • Scroll to the bottom of the page • Download “Standalone Release” • Extract all files • Modify the SpecRunner.html to include your own files and structure
What are some other tools? • QUnit: an alternative to Jasmine (http://qunitjs.com/) • JSCover: A code coverage tool (http://tntim96.github.io/JSCover/) • PhantomJS: a ‘headless’ JS environment --good for automatically running tests (http://phantomjs.org/)