E2E Testing without headache
Andrii Chubai
What is the cost of a bug?


What is the cost of a bug?


Testing Pyramid

💸
🏎💨
Unit testing
- Mocha
- Jest
- Jasmine
- Super fast
- Easy to setup
- Easy to write
Tools
- Not all equally use
fulless

Unit testing

That works separately not always works together
Integration testing
What is it? Does anybody do it?
- Interact with DOM and browser's storage
- Stub the server
- Cleanup state between tests
Require
Integration testing
Unit


Integration testing
Integration?
No


What if there is no integration testing in the frontend?

NEW Testing Pyramid



E2E testing

- Real browser
- Real interactions
- Increases Confidence
- Allows us to cover sections of the application that unit tests don’t cover.
E2E testing

- Hard to setup
- Hard to write
E2E testing






E2E testing

- Hard to setup
- Hard to write
- Complex syntax
- No ability to use devtools
- Hard to understand why the test fails
- Driver bugs
E2E testing




Cypress
- Cypress APP
- Nice syntax
- Tools (JQ, underscore, sinon, mocha, chai)
- Time traveling
- Snapshot before and after action
Cypress











Cypress


Cypress



- Green test run
- Use reliable selectors
- Write tests but not too many


The End
E2E
By Andrii Chubai
E2E
- 234