Upgrade to Pro — share decks privately, control downloads, hide ads and more …

accepting acceptance testing

Avatar for cpow cpow
August 12, 2016

accepting acceptance testing

Introduction to acceptance testing with ember-cli and ember-cli-mirage

Avatar for cpow

cpow

August 12, 2016
Tweet

Other Decks in Technology

Transcript

  1. Discussion Overview of Acceptance testing Ember, and how it handles

    Acceptance testing Implement basic acceptance tests for requirement
  2. What is Acceptance testing “acceptance testing is a test conducted

    to determine if the requirements of a specification or contract are met”
  3. How does do it? With a suite of different tools

    • Ember.Test • Qunit • Ember-cli-mirage
  4. Ember.Test Helpers Synchronous Helpers
 find(selector, context); currentPath(); currentRouteName(); currentURL(); Asynchronous

    Helpers
 visit(url); fillIn(selector, text); click(selector); Wait Helper andThen();
  5. Example Structure import { test } from 'qunit'; import moduleForAcceptance

    from 'application/tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance | landing page'); test('User sees landing page before he/she can vote', function(assert) { visit('/vote'); andThen(() => { assert.equal(find(‘.landing’).length(), 1, ‘landing page is currently visible'); }); }); Importing build up / teardown stuff Asynchronous Helper Wait Helper Qunit Assertion Synchronous Helper
  6. What does Zark want? User to rate a pokemon 1.

    they see a landing page 2. after clicking through. they see a pokemon 3. they vote on hot/not and see value updated 4. they try to click again to get another pokemon 5. when they’re out of pokemon, they return home
  7. What have we done? • Proved that our contract /

    specification works • A sanity check for all devs/qa • Groundwork for how the application behaves