Dapps E2E testing
What's an End-to-End test?
E2E - Characteristics
- isolated
- slow
- pretty expensive to maintain and write
- should give the confidence to deploy
Example
video
Challanges
- control app programatically
- control signer/web3 programatically
- deploy isolated infrastructure (backend / blockchain contracts)
- put system in a desired state
- CI / Nightly builds
- maintaining test suite / flaky tests
Controlling browser programmatically
Selenium Webdriver
- mature technology
- many backends (browsers, ios/android etc.)
- client / server achitecture
- chimp.js / protractor
Puppeteer (Headless Chrome Node API)
- works only with chrome
- maintained by google
- pretty popular
- allows for easy testing browser extensions
Cypress.io
- currently works only with chrome
- different, more robust architecture
- less flaky tests
- possible to test extensions
- cypress dashboard
Controlling web3 programmatically
- inject dummy web3 instance just before the opening browser
- load & control metamask extension
- OasisDEX/metamask-e2e
- DEMO 🦊
Infrastructure
Continuous Integration speed hacks
- parallel jobs
- docker base images
- docker caching
Thanks!!!
Dapps E2E testing
By krzkaczor
Dapps E2E testing
- 541