Agile JavaScript Testing
From Open Source Bridge attendee wiki 2009
With the recent surge in JavaScript popularity, and the advances in JavaScript virtual machines, serious applications can and are being built in JavaScript. As the sophistication of these apps grow, so grows the need for verifying that our code continues to work as we expect. We’ll briefly cover the advantages of test driven development, the reasons for pushing it all the way to the browser level, and then explore the options for testing JavaScript, look at some examples, and then integrate the tests into our existing development workflow.
Speaker: Scott Becker
Return to this session's details
[edit] Contributed notes
TDD + BDD (behavior driven development)
specs to describe behavior
ScrewUnit BDD framework
Blue Ridge
ScrewUnit
http://github.com/nkallen/screw-unit/tree/master
inspired by rspec
opinion - one expectation per spec
UI interactions DOM testing
Mocking and Stubbing - interacting with external API - using smoke library Browser events Ajax requests and callbacks
Integrating with existing testing framework - BlueRidge http://github.com//relevance/blue-ridge
- run test from CLI
- Rhino - java based javascript interpreter
- env.hs - DOM in js
- Screw.Unit and .. with plugins
... queue live example ...
JS Test Driver - tests in parallel across multiple browsers