Software:K6 (load testing tool)

From HandWiki
K6

K6 is free and open source load testing tool and SaaS for engineering teams.[1][2][3][4][5][6] Scriptable with JavaScript[7][8][9][10][11][12][13][14] but without NodeJS dependency, integratable in CI.[15][16][17][18][19][20][21] Possible to convert HAR,[22] JMeter, Postman scripts,[23] Swagger[24][25] to k6 scripts.[26] Alternative to JMeter.[27][28][29] Support HTTP and WebSockets.[30][31][32][33] Exists official Docker image.[34][35][36] Possible to check of response.[37][38] Supports a set of built-in and custom metrics that can be used to measure various things: Counter, Gauge, Rate and Trend.[39][40] Works as command-line interface,[41][42] output of performance test results and metrics possible to export to JSON,[43] InfluxDB,[44][45] TimescaleDB,[46] DataDog, Kafka,[47] create interactive dashboard using Grafana, Netdata.[48] K6 is used by Amazon, Microsoft, Gitlab, Citrix, etc.

Code example for running test:

import http from 'k6/http';
import { check, sleep } from 'k6';

export let options = {
  stages: [
    { duration: '30s', target: 20 },
    { duration: '1m30s', target: 10 },
    { duration: '20s', target: 0 },
  ],
};

export default function () {
  let res = http.get('https://httpbin.org/');
  check(res, { 'status was 200': (r) => r.status == 200 });
  sleep(1);
}

History

In 2000, K6's founding team was working on a MMORPG, with the goal of supporting hundreds of players simultaneously, the need for load testing arose, and the team opted to open a consultancy to support organizations including the European Space Agency.

In 2021, K6 was acquired by Grafana.[49][50]

See also

References

  1. "15 Top Load Testing Tools for 2021 (Open Source Guide)" (in en-US). 2021-03-23. https://testguild.com/load-testing-tools/. 
  2. Lawrence, Joseph. "How to Use k6 Load/Performance Testing for Web Pages" (in en-us). https://blog.avenuecode.com/how-to-use-k6-load/performance-testing-for-web-pages. 
  3. "Load Testing a TMS Tile Server with k6.io" (in en-US). 2021-01-25. https://www.azavea.com/blog/2021/01/25/load-testing-a-tms-tile-server-with-k6-io/. 
  4. "Load testing using K6 · Software Engineering Blog". https://mostafa-asg.github.io/post/k6-http-load-test/. 
  5. Drake, Marie (2020-08-24). "Shifting Performance Testing to the left with k6" (in en). https://www.mariedrake.com/post/shifting-performance-testing-to-the-left-with-k6. 
  6. "Load testing for a Node.js app with K6 - Inextenso - A blog by Nicola Zanon". https://www.inextenso.dev/load-testing-for-a-node-js-app-with-k6. 
  7. "The Perks and Pitfalls of Load Testing with k6" (in en-US). 2021-06-10. https://www.maestralsolutions.com/the-perks-and-pitfalls-of-load-testing-with-k6/. 
  8. Baltisberger, Johnny (2021-01-18). "Performance Testing with K6" (in en-US). https://gigaom.com/2021/01/18/performance-testing-with-k6/,%20https://gigaom.com/2021/01/18/performance-testing-with-k6/. 
  9. "How to do performance testing using k6 tool like an absolute pro | TSH.io" (in en-US). 2021-07-13. https://tsh.io/blog/how-to-do-performance-testing-using-k6/. 
  10. "Load Test Your Nuxt API on Vercel With k6" (in en). 2021-03-23. https://davidparks.dev/blog/loadtest-your-nuxt-api-with-k6/. 
  11. "Web application stress testing with K6" (in en-US). 2019-03-11. https://www.seeleycoder.com/blog/web-application-stress-testing/. 
  12. "Load Testing Serverless Functions" (in en-US). 2021-01-31. https://iamondemand.com/blog/load-testing-serverless-functions/. 
  13. Mathiazhagan, Arvind (2018-08-28). "Microservice Performance Testing" (in en-AU). https://digio.com.au/microservice-performance-testing/. 
  14. Developer, Web. "An Easy Way to Load Test Your Web Apps | WebDevStation" (in English). https://webdevstation.com/posts/an-easy-way-to-loadtest-your-web-apps/. 
  15. Moradian, Mostafa (2020-07-01). "Beginner’s Guide to Load Testing with k6" (in en). https://medium.com/swlh/beginners-guide-to-load-testing-with-k6-85ec614d2f0d. 
  16. "How to Use k6 for Performance Testing Your Code" (in en-us). 2020-05-13. https://www.sitepen.com/blog/performance-testing-with-k6. 
  17. "Automate Performance Tests in your Organization with GitHub Actions, AWS Code Build and K6 - fireup.pro" (in en). https://www.fireup.pro/blog/automate-performance-tests-in-your-organization-with-github-actions-aws-code-build-and-k6. "Using GitHub Actions combined with AWS CodeBuild and K6 gives a powerful way to deliver a feature-rich CI/CD pipeline to keep your services in good condition avoiding performance degradation" 
  18. "Performance Testing with k6". https://www.tpisoftware.com/tpu/articleDetails/1597. 
  19. malike_st (2019-07-05). "Load Testing with k6.io". https://malike.github.io/Load-Testing-With-K6.html. 
  20. "An End-to-End Guide of Load Testing | Abstracta" (in en-US). 2021-05-21. https://abstracta.us/blog/performance-testing/load-testing-guide/. 
  21. "Load Testing With Azure DevOps And K6". https://www.c-sharpcorner.com/article/load-testing-with-azure-devops-and-k6/. 
  22. "Load Testing on the Web with K6". https://odetocode.com/blogs/scott/archive/2019/04/17/load-testing-on-the-web-with-k6.aspx. 
  23. Das, Sejuti (2020-04-14). "k6 Improves Load-Testing By Integrating Application Programming Interfaces" (in en-US). https://analyticsindiamag.com/k6-improves-load-testing-by-integrating-application-programming-interfaces/. 
  24. "Testing REST API using K6". https://craftbakery.dev/testing-rest-api-using-k6/. 
  25. "Top 27 Performance Testing Tools to Use in 2021" (in en-US). 2021-06-21. https://kinsta.com/blog/performance-testing-tools/. 
  26. "k6 Review: Open Source Load Testing Tool for Developers | Abstracta" (in en-US). 2021-01-23. https://abstracta.us/blog/performance-testing/k6-review/. 
  27. "Comparing k6 and JMeter for load testing" (in en-us). 2021-01-29. https://nicolevanderhoeven.github.io/blog/20210129-k6-vs-jmeter/. 
  28. "5 Things that Are Easier in k6 Than in JMeter - DZone Performance" (in en). https://dzone.com/articles/5-things-that-are-easier-to-do-in-k6-than-in-jmete. 
  29. Azevedo, Rafaela (2020-07-06). "Load tests: Jmeter vs K6" (in en). https://azevedorafaela.com/2020/07/06/load-tests-jmeter-vs-k6/. 
  30. Ghahrai, Amir. "k6 - The Best Developer Experience for Load Testing" (in en). https://devqa.io/k6-load-testing/. 
  31. Foong, Ng Wai (2021-03-02). "Load Testing WebSockets With k6" (in en). https://betterprogramming.pub/load-testing-websockets-with-k6-feb99bf75798. 
  32. Bajpai, Ishan (2020-07-01). "20 Best Performance Testing Tools (Load Testing Tools)" (in en-us). https://geekyhumans.com/best-performance-testing-tools/. 
  33. "15 BEST Performance Testing Tools (Load Testing Tools) in 2021". https://www.softwaretestinghelp.com/performance-testing-tools-load-testing-tools/#13_k6. 
  34. "k6 - load and performance testing platform" (in en). 2020-05-30. https://www.blackvoid.club/k6-load-and-performance-testing-platform/. 
  35. "Running Load Tests From the Cloud With k6" (in en). 2020-05-21. https://benfoster.io/blog/running-load-tests-from-aws-cloud-with-k6/. 
  36. Gyorgy (2020-05-07). "Load Testing with k6 on Azure Container Instances" (in en). https://azureserverless.com/post/load-testing-with-k6-on-aci/. 
  37. Shaddel, Poorshad (2020-12-06). "Load Test your NodeJS app using K6" (in en). https://levelup.gitconnected.com/load-test-your-nodejs-app-using-k6-f7b2bd8fa5cf. 
  38. Foong, Ng Wai (2020-12-22). "An Introduction to k6: An API Load-Testing Tool" (in en). https://betterprogramming.pub/an-introduction-to-k6-an-api-load-testing-tool-132a0d87827d. 
  39. Moradian, Mostafa (2020-07-01). "Beginner’s Guide to Load Testing with k6" (in en). https://medium.com/swlh/beginners-guide-to-load-testing-with-k6-73d55ee23723. 
  40. "How to Autoscale Kubernetes Pods with Keda - Testing with k6" (in en). https://dev.to/k6/how-to-autoscale-kubernetes-pods-with-keda-testing-with-k6-4nl9. 
  41. "Top 5 Kubernetes Load-Testing Tools and How They Compare Speedscale" (in en-US). 2021-04-08. https://speedscale.com/2021/04/08/kubernetes-load-testing/. 
  42. Loisel, Jérôme (2017-11-21). "Ultimate Guide: 23 Free Load Testing Tools Reviewed" (in en). https://octoperf.com/blog/2017/11/21/open-source-load-testing-tools/. 
  43. "k6 JavaScript Performance Testing" (in en-US). 2018-07-19. https://testguild.com/javascript-performance-testing-k6/. 
  44. "Load Test Using k6 | Chintu Gudiya Foundation" (in en-US). 2020-09-28. https://chintugudiya.org/blog/load-test-using-k6/,%20https://chintugudiya.org/blog/load-test-using-k6/. 
  45. "Automated Performance Testing with K6" (in en). https://www.testrisk.com/2019/12/automated-performance-testing-with-k6.html. 
  46. "Explore Timescale Success Stories: K6" (in en). https://www.timescale.com/case-studies/k6. "k6 uses TimescaleDB to process, store, and analyze their high-volume of time-series metrics data" 
  47. Ramos, Joel (2020-07-15). "Load Testing in 2020 with k6!" (in en). https://blog.ramosly.com/load-testing-in-2020-with-k6-e43c13c5f403. 
  48. "K6 load test monitoring with Netdata | Learn Netdata" (in en). https://learn.netdata.cloud/docs/agent/collectors/statsd.plugin/k6. 
  49. "Grafana Labs acquires load-testing startup K6" (in en-US). 2021-06-17. https://venturebeat.com/2021/06/17/grafana-labs-acquires-load-testing-startup-k6/. 
  50. "Grafana Labs Acquires k6 to Add Open Source Load Testing Tool - DevOps.com". https://devops.com/grafana-labs-acquires-k6-to-add-open-source-load-testing-tool/.