Testing Meteor Applications
End-to-End Testing with Cucumber and Nightwatch
By: Adrian Lanning & Abigail Watson
Agenda

- Testing Overview
- Cucumber
- Nightwatch
Types of Testing
- End-to-End Testing
(aka Acceptance, Functional) - Integration Testing
- Unit Testing
- Usability Testing
- Load / Stress Testing
- Performance Testing

End-to-End Testing
- Tests execute as a client from
the boundaries of the service- Test your Web UI
via Browser Automation
(Selenium + WebDriver)
- Test REST API via
standard HTTP calls
- Test your Web UI
- Meteor Test Frameworks:
- Cucumber
- Nightwatch

Integration Testing
- Tests run in regular Meteor context
- Meteor, Mongo,
Template, Session
on client
- Meteor, Mongo,
process.env on server
- Meteor, Mongo,
- Meteor Test Frameworks:
- Mocha
- Jasmine
- Tinytest
- Laika

Unit Testing
- Tests run in isolated context
- super fast
- have to mock/stub anything
code depends on to run
- super fast
- Meteor Test Frameworks:
- Jasmine

(It's a sticker...)
Behavior Driven Development
Source - https://cukes.info/
Describe behavior in plain text


Write step definitions
Meteor-Cucumber demos
- Add to existing meteor app
meteor add xolvio:cucumber
-
velocity-examples
- Letterpress
Meteor Testing Resources
- Books
- Meteor Testing - http://www.meteortesting.com/
15% off discount, good until Feb. 21, 2015
https://gumroad.com/l/CjWVEw/devshop-ny
- Meteor Testing - http://www.meteortesting.com/
- Test Frameworks - http://velocity.meteor.com/
- Examples
Testing Meteor Applications
By alanning55
Testing Meteor Applications
- 1,741