Skip to content
  • ZipCode Api
  • Blog
  • About RedLine13
RedLine13
RedLine13
Primary Navigation Menu
Menu
  • Start Testing
  • Demo
  • Pricing
  • JMeter
  • Partners
  • Docs
    • Documentation Home
    • AWS Set Up for load testing
    • AWS Approval for Large Tests
    • PHP, NodeJS, Python Load Tests
    • Scalability
    • Jenkins Plugin Setup
    • Premium Features
    • Knowledge Base

The k6 Graphical Test Builder

By: David Koziel

The k6 Graphical Test Builder

Most examples that illustrate how to create a k6 load test center around using a bottom-up approach with code. This is in contrast with frameworks such as JMeter where it is typical for tests to be created visually. However, there is a utility by Grafana Labs for creating k6 load tests with a GUI. In this post, we will show you how to use the graphical Test Builder to create k6 load tests.

The Graphical k6 Test Builder

In order to take advantage of this tool, you will need a Grafana account. If you don’t already have one, you can create one on the Grafana Labs website. Once you log in, the Test Builder can be accessed when creating a new test plan for a project:

Click the “Start Building” button under the Test Builder heading to create a new test plan
Click the “Start Building” button under the Test Builder heading to create a new test plan.

From there, you can add requests and other elements such as groups, and sleep intervals. Below is an example of adding a single request to our test plan:

Adding requests to a k6 test plan using the graphical Test Builder
Adding requests to a k6 test plan using the graphical Test Builder.

Configuring Requests

Let’s go ahead and create a GET request to the /register endpoint of our hypothetical enterprise app. With the Test Builder, this is as easy as typing in the URL to our target test page, and for convenience, giving our request a friendly name. You can see that our request immediately displays on the left as part of our test plan.

Specifying request details for a simple HTTP request
Specifying request details for a simple HTTP request.

Using this process, we can add as many requests as we want – we can even group them together and add other elements to control test logic flow.

Exporting Test Scripts

Once we are satisfied with our test, we can slide the view selector from ‘builder’ to ‘script’ which will allow us to view the underlying k6 JavaScript that the Test Builder has created:

The graphical Test Builder will present the full source for your complete k6 test
The graphical Test Builder will present the full source for your complete k6 test.

While the code that is generated will be read-only inside the Test Builder app, you can port this script to your favorite code editor and modify it. This can accelerate many basic tasks, and can greatly simplify the amount of code that must be written by hand for common operations.


Did you know that RedLine13 offers a full-featured, time-limited free trial?  Sign up now, and start moving your testing into the cloud today.

2024-01-30
Previous Post: Top 5 Most Useful k6 Extensions
Next Post: Functional Testing with k6

Recent Posts

  • Order of Elements in JMeter
  • The JMeter Synthesis Report
  • Using the JMeter Plugins Manager
  • JMeter Rotating JTL Listener
  • Using Test Fragments in JMeter Tests

Related

  • Order of Elements in JMeter
  • SAML Configuration with Azure AD and RedLine13
  • SAML Configuration with OKTA and RedLine13
  • SAML Configuration with Google and RedLine13
  • The JMeter Synthesis Report
  • Using the JMeter Plugins Manager
  • JMeter Rotating JTL Listener
  • Using Test Fragments in JMeter Tests
  • Step-by-Step Guide to Testing with JMeter
  • Functional Testing vs Performance Testing

© RedLine13, LLC | Privacy Policy | Contract
Contact Us: info@redline13.com

Designed using Responsive Brix. Powered by WordPress.