This Cypress post just blew my mind


This Cypress post just blew my mind.

Summary: Avoid initializing test data via the UI. Instead, add a test-friendly API to your app.

The API will initialize each test MUCH faster than using the UI. 🔥

Excited to speed up my tests!💪

https://www.cypress.io/blog/2019/01/03/stop-using-page-objects-and-start-using-app-actions/

Thanks @bahmutov!
This is a similar idea to creating custom dev tools. I've been doing that for years. For example, custom dev tools allow me to quickly change users and set initial data. But, it never occurred to me to create a custom API to allow tests to quickly inject data into the app. 😍

View original on X