• Documentation
  • Tutorials
  • Case studies
  • Blogs
  • Product

What's on this Page

  • Installation
  • Usage
    • Basic keyword configuration
    • Advanced options
    • Keyword Output
  • step
  • Plugins
  • Grafana K6 Plugin
Categories: PLUGINS
This article references one of our previous releases, click here to go to our latest version instead.

Grafana K6 Plugin

Grafana K6 is an open-source load testing tool developed by Grafana.

K6 scripts can be executed in Step via the Grafana K6 Plugin, available to Step enterprise customers. This page describes how to install, configure and use the Grafana K6 plugin for Step.

Installation

Before using this plugin, Grafana K6 has to be installed on the machine running your agents.

By default, the k6 executable will be launched from your ${PATH}. You can define another installation folder by using the following property in the configuration file of your agent:

plugins.k6.folder: "C:\\Program Files\\k6\\"

Usage

Basic keyword configuration

When K6 is installed, you can easily run your script by creating a new keyword and uploading your js file:

Grafana K& Keyword configuration screen

You can also upload a zip file if your script is composed of modules:

Grafana K6 Keyword configuration screen. Adding a zip file

Three basic options are visible by default:

  • Iterations: defining the total number of iterations to run your script
  • Duration: defining the total duration of your script. Note that the duration should include a suffix indicating the time unit (like ’10s’ or ‘5m’)
  • Virtual Users (VUs): defining the number of VUs to run concurrently

Advanced options

It is also possible to controller the options passed to the k6 process via the Other Grafana K6 options dropdown:

Grafana K6 Keyword configuration screen. Advanced options

This screen allows you to define options via:

  • Command lines: in this example, we override the default user agent
  • Environment variables: some options can only be passed as environment variables. In this case, we change the Headless option of the browser

Activating the debug mode

The debug mode can be activated by setting a parameter named debug to true or full:

Activating debug for a Grafana K6 Keyword

This will activate the debug for Http scripts and browser based scripts

Keyword Output

When executing a K6 keyword, the following results will be available in Step

  • In case of error, the stdOut and stdError will be attached to the execution
  • If debug is activated, a debug.log file will be attached
  • If your browser-based keyword generated screenshots, these files will also be attached to the execution
  • Finally, the following metrics will be collected and available in the analytics dashboard
    • trend
    • gauge
    • rate
    • counter

For example, below is the result of an successful execution with debug activated:

Successful run of a Grafana K6 Keyword

Another example with a browser-based keyword, including a screenshot and an error:

Failure of a Grafana K6 Keyword

See Also

  • .NET agent
  • Astra Plugin
  • Cypress Plugin
  • JMeter
  • Node.js agent
  • Home
  • Whats new?
  • Admin guide
  • User guide
  • Developer guide
  • Plugins
    • .NET agent
    • Astra Plugin
    • Cypress Plugin
    • Grafana K6 Plugin
    • Node.js agent
    • SikuliX Plugin
    • Silk Performer Plugin
    • ALM
    • Azure DevOps
    • Jira Xray
    • Async packages
    • JMeter
    • SoapUI
    • PDF and Image compare
    • Artifact repository connector
    • Docker plugin
    • Maven plugins
    • Analytics and external DBs
  • Libraries
Step Logo
    • Documentation
    • Tutorials
    • Case studies
    • Blogs
    • Product
    • Home
    • Whats new?
    • Admin guide
    • User guide
    • Developer guide
    • Plugins
      • .NET agent
      • Astra Plugin
      • Cypress Plugin
      • Grafana K6 Plugin
      • Node.js agent
      • SikuliX Plugin
      • Silk Performer Plugin
      • ALM
      • Azure DevOps
      • Jira Xray
      • Async packages
      • JMeter
      • SoapUI
      • PDF and Image compare
      • Artifact repository connector
      • Docker plugin
      • Maven plugins
      • Analytics and external DBs
    • Libraries