Today I held an updated version of my Cypress on Rails talk at the Hamburg Ruby UserGroup.
The talk covers an introduction to Cypress, how to communicate with a Rails server from Cypress
to e.g. generate test data with factory_bot
and a way to run Cypress tests in CI
with spinning up the Rails application as a service in Gitlab CI or Github Actions.
We had a great discussion about responsibility for e2e tests (is it the backend team? is it the frontend team? why not both?) and whether e2e tests are needed at all when backend/frontend specific tests exist.
The slides can be found over at Github together with a demo project that contains
- a Rails 7 application with Rodauth and Turbo Frames and ActionText usage
- a small Cypress test suite
- Dockerfiles for both the application and Cypress
- a Github Actions configuration to build the Docker images and run the Cypress tests with the Rails Application as Service container
Thanks to everyone who attended the meetup, it was great talking to you!
All image were generated by DALL-E, there are a few more in the pitch
folder that were not used if you’re interested 🙂