Skip to content

Lab to transform the report data generated by cypress into a mySQL database. The database can later be read by grafana

Notifications You must be signed in to change notification settings

quatoo/cypress-mochawesome-to-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cypress-mochawesome-to-mysql

Lab to transform the report data generated by cypress into a mySQL database. The database can later be read by grafana

Getting Started

  1. npm install
  2. npm run cy:run to create cypress structure
  3. configure .env file or process.env with your mySQL parameters
    • DB_HOSTNAME
    • DB_USERNAME
    • DB_PASSWORD
    • DB_NAME
  4. npm run setup to create data structure on mySQL instance
  5. It's time to write some tests 💪🏻🧪, I left a few examples in the ./cypress/integration folder
  6. npm run cy:run again to run the tests
  7. npm run report to merge the mochawesome reports
  8. npm run extract to load results on mySQL database
  9. Party time 🥳

This project was written in conjunction with this article on 4future blog.

Considerations

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

About

Lab to transform the report data generated by cypress into a mySQL database. The database can later be read by grafana

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published