These tasks are all reproducible, so open up your favorite editor and follow along. Imagine that you are a developer or tester who is responsible for performance in your development team.
Your development team has just developed a new login endpoint. Before releasing, you must test the endpoint for the following questions:
- Does it work?
- Does it perform within the service-level objectives under average load?
- At what load does performance degrade beyond objectives?
After you test the endpoint, your team wants you to compare different components of the user-facing application.
Finally, after you test the API and web application, break your scripts down into reusable parts.
We encourage you to open your terminal and actively experiment with these examples. The tutorial requires the following:
- k6 installed
- A clean directory to experiment in.
- Something to do during the minute or two when k6 runs the longest example tests
- Optional: jq to filter some results