Ministry of Testing
Rio de Janeiro (online meetup)
C / C++ / C# / Java / CoffeeScript / JavaScript / Node / Angular / Vue / Cycle.js / functional
VP of Engineering Cypress.io
11 people. Atlanta, Philly, Boston, LA
Fast, easy and reliable testing for anything that runs in a browser
Will Klein
Quality software behaves the way users expect it to behave
E2E
integration
unit
E2E
integration
unit
E2E
integration
unit
E2E
integration
unit
Really important to users
Really important to developers
$ npm install -D cypress
it('opens the page', () => {
cy.visit('http://localhost:3000')
cy.get('.new-todo')
.should('be.visible')
})
it('opens the page', () => {
cy.visit('http://localhost:3000')
cy.get('.new-todo')
.should('be.visible')
})
Mocha test syntax
it('opens the page', () => {
cy.visit('http://localhost:3000')
cy.get('.new-todo')
.should('be.visible')
})
Select elements and chain commands just like jQuery
it('opens the page', () => {
cy.visit('http://localhost:3000')
cy.get('.new-todo')
.should('be.visible')
})
Chai assertions
it('adds 2 todos', () => {
cy.visit('http://localhost:3000')
cy.get('.new-todo')
.type('learn testing{enter}')
.type('be cool{enter}')
cy.get('.todo-list li')
.should('have.length', 2)
})
Cypress demo:
branch: mot-rio-demo
git clone git@github.com:cypress-io/testing-workshop-cph.git
cd testing-workshop-cph
git checkout mot-rio-demo
npm install
npm start & npm run cy:open
Many presentations and videos about Cypress
Egghead.io Cypress Course
Free course (same author Andrew Van Slaars!)
Cypress documentation
Cypress examples
Test components from these frameworks with ease
cypress run --record
cypress run --record --group single
cypress run --record --group parallel --parallel
Most CIs should just work 🙏
one group
another group
one group
another group
--parallel