Gleb Bahmutov PRO
JavaScript ninja, image processing expert, software quality fanatic
https://lizkeogh.com/2019/07/02/off-the-charts/
+3 degrees Celsius will be the end and we are close
C / C++ / C# / Java / CoffeeScript / JavaScript / Node / Angular / Vue / Cycle.js / functional programming / testing
75 → 20
2000
8 → 100
5 → 50
300 (2000)
75 → 20
2000
8 → 100
5 → 50
300 (2000)
Gleb, we need our stuff to work.
I have kept a list of ideas, bugs, problems related to Cypress and Cypress Dashboard service, the list keeps growing.
Every VP / Director
QA team
Web team
ReactNative team
DevOps team
API / Backend team
What are your goals?
What do we have now?
What is the current process?
What can we do?
Where is everything?
How do I?
Let's debug a failed MABL test
Let's debug a failed Webdriver test
Mike Cohn - Succeeding with Agile (2009)
E2E
integration
unit
Really important to users
Really important to developers
E2E
integration
unit
future
sprint 2
sprint 1
We started here
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Documentation
Training
Prev experience
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Documentation
Training
Prev experience
CI Setup
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Documentation
Training
Prev experience
CI Setup
The test runner
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Installation
Writing tests
Running tests
Debugging tests
Maintenance
Tokyo is +13 hours from Boston 🤕
I hope these tests are not going to be extra work for us...
Writing these tests and running them as you implement the feature will make your more productive
Typical Cypress E2E test
cy.signup(seller)
cy.createListing({
name: `Macbook one ${Cypress._.random(1e10)}`,
description: 'Seller will delete all items',
price: 198,
})
cy.createListing({
name: `Macbook two ${Cypress._.random(1e10)}`,
description: 'Seller will delete all items',
price: 199,
})
visitBlankPage()
cy.loginUserUsingAPI(seller)
cy.visitProtectedPage('/mypage/listings/active')
cy.byTestId('Filter', 'Active').should('be.visible').and('contain', '2')
cy.byTestId('ListingRow').should('be.visible').and('have.length', 2)
Pull request template
A typical Cypress test
From Cypress Dashboard to GitHub PR comment via https://on.cypress.io/github-integration
Scroll to see the list of skills and resources
There is no instant way to transform manual QA into automation engineers
- https://glebbahmutov.com/blog/cypresss-data-session/
- https://glebbahmutov.com/blog/refactor-using-each/
- https://glebbahmutov.com/blog/dynamic-api-tests-using-cypress-each/
- https://glebbahmutov.com/blog/cypress-and-testrail/
- https://glebbahmutov.com/blog/cypress-skills-ladder/
- https://glebbahmutov.com/blog/faster-ci-feedback-on-circleci/
- https://glebbahmutov.com/blog/request-graphql/
- https://glebbahmutov.com/blog/dynamic-tests-from-fixture/
- https://glebbahmutov.com/blog/skip-cypress-install-on-ci/
- https://glebbahmutov.com/blog/verify-phone-part-one/
- https://glebbahmutov.com/blog/verify-phone-part-two/
- https://glebbahmutov.com/blog/detached/
- https://glebbahmutov.com/blog/visit-blank-page-between-tests/
- https://glebbahmutov.com/blog/burn-tests-on-circle/
- https://glebbahmutov.com/blog/avoid-cypress-pyramid-of-doom/
- https://glebbahmutov.com/blog/control-nextjs-data-during-tests/
- https://glebbahmutov.com/blog/test-feature-flags/
- https://glebbahmutov.com/blog/rn-test-for-navigation/
- https://glebbahmutov.com/blog/test-app-using-the-keyboard/
- https://glebbahmutov.com/blog/how-to-keep-cypress-tests-in-another-repo-with-circleci/
- https://glebbahmutov.com/blog/cypress-second-tab/
- https://glebbahmutov.com/blog/cypress-real-events/
- https://glebbahmutov.com/blog/sanity-test/
- https://glebbahmutov.com/blog/testing-rn-todo-app/
- https://glebbahmutov.com/blog/stubbing-the-non-configurable/
- https://glebbahmutov.com/blog/testing-react-native-app-using-cypress/
README
(if any)
Wiki
(if up-to-date)
Slack
(if can find it)
How do I ...
Your coworkers will thank you
The Dev environments are less than dependable
💡 E2E tests can be as quick as the longest-running test
Make every failed test 🚨 count
By driving the web app like a real user, our E2E tests have found issues with each service
QA Team, Web teams
describe('User tests', () => {
it('C111 User can log in', () => {
cy.wait(1000)
})
it('C112 User can log out', () => {
cy.log('in the last test!')
cy.wait(1000)
})
})
This feature (API, element selector, CI job, ...) is only needed for your tests...
This feature (API, element selector, CI job, ...) is necessary to have confidence in our application and services
If your team needs it, you do it. Be bold. Be fullstack.
Can I speak to your manager?
It is on our backlog already. It has been there for months.
Let's schedule a regular status meetings (with CTO) until it gets done.
future
current work
By Gleb Bahmutov
Many organizations struggle with building a reliable set of automated tests for their web applications. Yet a set of manual test plans is not an answer; testing without automation is slow, gives low confidence in the software, and the test results provide little actionable feedback to the developers. In this presentation, I describe how a large company has built a comprehensive automated set of end-to-end test suites after two previous unsuccessful attempts. I will show how to build trust between the QA engineers and front-end developers, how to convince other stakeholders that investing time in testing is important, and how to balance the different types of tests to cover both the happy paths and the edge cases.
JavaScript ninja, image processing expert, software quality fanatic