A newly created cloud infrastructure needs to be tested before taking it to production.
How many concurrent visitors can your infrastructure handle? How quickly does it scale up? What happens when the system is overloaded?
Wanting to test a newly setup AWS cloud infrastructure, I turned to Golang, my favorite programming language. Then I encountered K6 (written in Golang and available in an open-sourced community edition and a cloud edition).
I quickly saw the community edition featured the most important requirements for the test I wanted to do:
- Schemas to implement the different test types can be scripted.
- Simulation of real life user behaviour can be scripted.
- Individual requests can be fully specified with headers and tokens.
- The scripted test can be saved in a single file for an easy re-run later on.
After reviewing and using the community edition, I decided to look at the cloud version.
K6 Clouds features are impressive and offer great possibilities in reporting, graphs, test comparisons and connectivity.
One significant adantage is that tests configured in the cloud edition, can be used locally in the community edition just by simply copying the script.
This way the cloud configuration can first be tested locally, and adjusted if needed, without running a full test.
For professional use, my workflow is:
- implement a first test locally with the community variant
- review global test result to get an impression of the system
- adjust and fine-tune the load test if needed
- port the test to the K6 cloud edition
- run the cloud tests for production - with extensive reports to present to the client, and if needed regularly run with a preset scheme
Thanks, k6 and Golang!