Lab to transform the report data generated by cypress into a mySQL database. The database can later be read by grafana
npm installnpm run cy:runto create cypress structure- configure
.envfile or process.env with your mySQL parameters- DB_HOSTNAME
- DB_USERNAME
- DB_PASSWORD
- DB_NAME
npm run setupto create data structure on mySQL instance- It's time to write some tests 💪🏻🧪, I left a few examples in the
./cypress/integrationfolder npm run cy:runagain to run the testsnpm run reportto merge the mochawesome reportsnpm run extractto load results on mySQL database- Party time 🥳
This project was written in conjunction with this article on 4future blog.
For more effective control, you can also split this project into two parts
- One to set up the database and process the mochawesome report
- And another exclusively to run cypress