1 / 13

Jasmine Testing Framework

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

wolfe
Download Presentation

Jasmine Testing Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Jasmine Testing Framework

  2. What’s Jasmine For? • Framework for Test Driven Development • Designed around acceptance testing • Works in any environment (with or without browser, etc.)

  3. What does Jasmine look like?

  4. 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

  5. Citadel Trivia App HTML Skeleton

  6. How do I write a test?

  7. What do the test results look like?

  8. What about when they fail?

  9. How do I use dummy results?

  10. And the results?

  11. What does the testing driver look like?

  12. 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

  13. 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/)

More Related