This is a simple starter project which can be cloned to start performance testing with k6. It is currently based on k6 v0.52.0.
- Build the test.ts with:
npm run build
- Run the protocol test with:
npm run testp
- Run the browser test with:
npm run testb
Check the issues page to get an overview over the open issues I am currently struggling with or are in the making/backlog for this project.
- Protocol-Level Testing
- Browser-Level Testing
- Here are some recommendations on when choosing which test level, all with the thing in mind that you can tailor it to your specific needs.
As browser based testing with a lot of virtual users is resource-intensive, it may make sense to combine testing on the protocol (http/backend) level and on the browser (frontend) and go with a hybrid approach. Here is an example how this can be achieved.
- For debugging purposes, one can take screenshots for every action.
- All about how k6 emits metrics from a test-run and reports them, can be read up here.