- Author: [[Shradha Khard]] on [[Gigaom]]
- Full Title: Performance Testing With K6
- Tags:: [[k6 (Company)]] [[Performance Testing]] [[k6 (tool)]] [[Load Testing Tool]]
- URL: https://gigaom.com/2021/01/18/performance-testing-with-k6/
- ### Highlights first synced by [[Readwise]] [[2021-01-20]]
- “Write a load test like a unit test.” It’s a phrase from k6’s web site that immediately grabbed my attention when I explored the tool after a colleague introduced me to it.
- > the first thing that I liked was that I can use JavaScript to write a performance test. It was a winning moment for me being a Java developer—I already knew how to write JavaScript.
- This is wrong! [[Java]] as a language is not related to [[JavaScript]].
- Even better, k6 isn’t a browser-based utility—I could run the test on a command-line tool with a simple one-line command.
- Because I can dynamically generate the test data using JavaScript functions and classes, I used the load test to create production-level traffic in our staging environment during the deployment of newer artifacts.
- I used [[GitHub]] to source control my testing code.
- I used the [[Grafana]] dashboard to generate a report of resource utilization and cost to run the service.
- K6 integrates with many test visualization tools, though I have yet to explore them as my k6 journey has just started. In fact, that’s my biggest complaint. Unlike [[Gatling]], k6 lacks a graphical result summary that does not require a third-party integration.
- I have used other testing tools like Apache Benchmark, [[JMeter]], Gatling, and [[Postman]], but k6 outshines them all with its ease of writing workflows using various operations provided by a service. Adding field validations, asserting outputs, generating dynamic dataset, and debugging the tests were all likewise very easy compared to other tools I have used in the past.
- **Note**: Ask her if we can quote her on this.
- She said yes!