How to Run a K6 Load Test in BlazeMeter with Taurus
BlazeMeter allows users to run K6-based test suites through Taurus. By tracking their test results in BlazeMeter, K6 users can identify regressions and new problems, so they can resolve performance bottlenecks before releasing a new version into production. This blog post will explain how to easily run your K6 test in BlazeMeter with just a few steps.
Getting Started with K6 and BlazeMeter
1. Create your K6 configuration script.
This is ours, k6_example.js. It is just a simple example of the K6 file structure that demonstrates how to open a web page. You will replace this file with one of your existing K6 scripts.
2. Write your Taurus test in a text editor. You can learn more about Taurus testing here, or you can just use this example script with the simplest configuration as a template:
Make sure to set the executor name to ‘K6’. Here I set the number of concurrent users to 100 and the test will run for one minute. You can set those two parameters to any numbers of your choice. And don’t forget to put your K6 script name (here k6_example.js) into the scenario section of the file.
3. Save this code in a YAML file, here we will save it as ‘k6_example.yml’.
4. Make sure you have both files - the Taurus test and the K6 script. These two files are necessary for the performance test run.
5. Log on to https://a.blazemeter.com. You can create a free account if you don’t have one.
6. Create a new Performance Test by clicking on “Performance” -> Create Test -> Performance Test.
7. Upload both files. For more details, please see the guide Creating a Taurus Test.
8. After the files are uploaded, the ‘Scenario Definition’ section should look like this:
9. Click 'Run Test' on the left side and wait for it to finish.
10. After the test is done, you will see results in the table form similar to the following screenshot:
And that’s it! Get started with BlazeMeter today by clicking here.