mardi 11 août 2020

E2E response size test with Cypress

I am trying to write e2e tests around response sizes.

For example, I want to accomplish to Cypress (or any other e2e tool) check each response in network, and test them by their size.

Example cases;

  • *.png files should less than 100kb
  • *.js files should less than 50kb
  • {.js,.xml} should return with gzip header

etc.

Is there any way to automate this process? Currently I am using devtool to check them manually, but would love to test them automatically. Does not matter CI/CD environment, I can execute tests from cli to directly connect to website.

Aucun commentaire:

Enregistrer un commentaire