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

Introduction to Cypress

Introduction to Cypress

Lightning talk at E2E Test Automation Day 2019 with Selenium (Osaka)
https://seleniumjp.connpass.com/event/133553/

Mitsuyuki Shiiba

July 20, 2019
Tweet

More Decks by Mitsuyuki Shiiba

Other Decks in Programming

Transcript

  1. Lightning Talk – Introduction to Cypress Jul 20, 2019 at

    E2E Test Automation Day with Selenium Mitsuyuki Shiiba EC Incubation Development Dept. Rakuten, Inc. tw: bufferings
  2. 3 https://www.cypress.io/ "Fast, easy and reliable testing for anything that

    runs in a browser." Cypress doesn't use Selenium. Free / Open Source / MIT License
  3. 8 Easy to install, easy to run # Install everything

    with one command $ npm install cypress --save-dev # GUI Runner $ npx cypress open # Headless Runner $ npx cypress run
  4. 12 Automatic Waiting & Retry We can focus on what

    to test. it('adds 2 todos', function () { cy.visit('/') cy.get('.new-todo') .type('learn testing{enter}') .type('be cool{enter}') cy.get('.todo-list li') .should('have.length', 2) })
  5. 14 Cypress Architecture Browser (Using same domain with proxy) NodeJS

    Process Reference Dominic Elm - Cypress: The future of E2E testing https://youtu.be/pXyBligMMr0?t=1107 Tests (iframe) App (iframe) Cypress Proxy OS Web Websocket Start with Proxy DOM LocalStorage ... Service Worker
  6. 15 Many other good parts! • Real time reloads •

    Spies, stubs, and clocks • Network traffic control • Consistent results • Screenshots and videos (headless runner) • Dashboard (paid feature)
  7. 16 Restrictions • Only support Chromium currently • Seem to

    be working on Firefox, IE, Edge • Not supported (because of its architecture) • Multiple tabs/browsers • Multiple domains in one test case