Testing Meteor Applications

End-to-End Testing with Cucumber and Nightwatch

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
       
  • 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 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

       
  • Meteor Test Frameworks: 
    • Jasmine

(It's a sticker...)

Behavior Driven Development

Describe behavior in plain text

Write step definitions

Meteor-Cucumber demos

Meteor Testing Resources

Testing Meteor Applications

By alanning55

Testing Meteor Applications

  • 1,741