Cypress-Studio-like Chrome Extension that also captures API calls and turns them into fixtures.
Download from the Chrome Web Store.
- Go to the app you want to test. It works best on SPAs calling a JSON API - e.g. this GoT app (not mine) is a good test case.
- Click on the Extension and click
Inject into active tab
. - Enter a test title and assertion and click
Start recording
. - Start interacting with the app. The Extension will track actions and network activity.
- Download the test file and drop into your
cypress/e2e
dir. - Download and unzip the fixtures and drop the entire dir into your
cypress/fixtures
dir. - Open Cypress and run the test.
- Run
npm i
. - Run
npm run build
. - Go to your Chrome Extensions.
- Enable
Developer mode
(top right corner). - Click
Load unpacked
. - Select the
build
dir from this project. - The extension will then be added to your Chrome.
- Use
./demo/index.html
to try it out. - Run
npm run cypress:open
to open Cypress.
- The Extension will use
data-cy
selectors if available. Otherwise it will default to position in the DOM. - API calls made very fast when the page is loaded may be missed if the Extension code is not injected in time. But the extension will notify you if this happens.
- Tested heavily with
fetch
but less so withXMLHttpRequest
. - If you want to write E2E tests, toggle
Mock network requests
off. API calls will not be mocked in the test file but will be aliased and waited for to reduce flake.