Questions tagged [k6]

k6 is a backend infrastructure load testing tool written in Go which runs load tests written in JavaScript.

k6 is an open source performance analysis tool for testing backend infrastructure load.

k6 itself is written in Go and runs load test scripts implemented in JavaScript with support for at least ES5.1. Some newer features are also supported through Babel. k6, formerly loadimpact, is owned by Grafana Labs.

k6 supports a variety of common load testing requirements:

  • Scenarios
  • Open and closed workload models
  • (Custom) metrics
  • Thresholds
  • Different protocols, including HTTP, WebSocket, and gRPC
325 questions
0
votes
1 answer

K6 how run node command in the setup function

Please excuse my limited K6/Javascript knowledge. I have been given a javascript file that can be used to create a batch of users to be used within my k6 load test. The script is currently ran from the commmand line using this command: node…
Matt
  • 773
  • 2
  • 15
  • 30
0
votes
1 answer

k6 same environment variables in multiple export functions

Can I use same environment variables in multiple export function ? export function login() { group('Login API', function () { __ENV.code = 'code getting from api response'; console.log("code is : " + __ENV.code); //…
0
votes
1 answer

Parameterization same variable in all APIs in K6

I am extracting json value from json response and storing it into array and returning same array but value is getting undefind. Where as in setup function I am able to print value. export function setup() { let code = []; code =…
jenny
  • 7
  • 8
0
votes
1 answer

How to apply iterations condition for function in K6

I want to execute logout function for one time and dropDown function for multiple iterations. Which changes shoul I need in below code. executors: { logout: { type: 'per-vu-iterations', exec:…
0
votes
1 answer

K6 Load Testing - I am completely baffled by the stats that are printed at the end

Here is my very simple K6 script that I am running: import {group } from "k6"; import { Trend} from "k6/metrics"; let response = null; let loginTime = new Trend('login_time'); import http from "k6/http"; export let options = { stages: [ …
Matt
  • 773
  • 2
  • 15
  • 30
0
votes
2 answers

How to run K6 through docker with influxdb and Grafana

I am trying to execute my k6 tests with docker-compose and then visualise the results in grafana. I have started my containers and then tried editing the command given in the documentation: docker-compose run -v \$PWD/samples:/scripts \k6 run …
Eoin Corr
  • 75
  • 2
  • 8
0
votes
1 answer

K6 Load Testing - Can you specify whether the output metric for data received/sent is shown in kB or MB?

K6 Load Testing At the end of testing, the following metrics are shown: data_received..............: 1.4 MB 44 kB/s data_sent..................: 214 kB 6.7 kB/s In the above example, data_received is shown in MB whereas data_sent is shown in…
Matt
  • 773
  • 2
  • 15
  • 30
0
votes
2 answers

NTLM requests in K6 and .NEТ Core

I wrote load testing of my API with NTLM auth (here I additionally check if NTLM authorized user is presend in Database). During resquest: var url = 'https://login:*****@localhost:xxxx/api/authorization/logon'; var payload = { }; var params =…
0
votes
1 answer

K6 InfluxDB + Grafana Docker : Which folders and files are actually required and which can be removed?

I am using K6 for Load Testing, with Grafana and InfluxDB. I have cloned the K6, Grafana, InfluxDB docker-compose set up from here: https://github.com/loadimpact/k6 There are a huge number of folders and files in the cloned repository. I am guessing…
Matt
  • 773
  • 2
  • 15
  • 30
0
votes
1 answer

K6 InfluxDB + Grafana Docker : How many virtual users can I run from one container?

I am using K6 for Load Testing. I have cloned the K6, Grafana, InfluxDB docker-compose set up from here: https://github.com/loadimpact/k6 Is there a maximum limit to the number of virtual users you can ramp up to from one Docker Container? i.e. will…
Matt
  • 773
  • 2
  • 15
  • 30
0
votes
1 answer

K6 InfluxDB + Grafana Docker : What does "git submodule update --init" mean

I am using K6 for Load Testing. I have cloned the K6, Grafana, InfluxDB docker-compose set up from here: https://github.com/loadimpact/k6 The instructions for using the Docker are at the bottom of this page…
Matt
  • 773
  • 2
  • 15
  • 30
0
votes
2 answers

How create step lad in k6 for websocket

I try to generate step load for performance test on k6 for websocket. regular settings like export let options = { stages: [ { "duration": "0m30s", "target": 10 }, { "duration":…
Liliia
  • 1
  • 1
0
votes
1 answer

K6 Load Testing - How to run different scenarios at the same time

I have written a simple K6 Load testing script that performs a successful login. I have written a separate K6 Load testing script that performs an unsuccessful login attempt They are currently separate scripts that you have to run on their own. What…
Matt
  • 773
  • 2
  • 15
  • 30
0
votes
1 answer

Is there an API available to start K6 test run or any alternate such as curl if I want to start K6 test run on a remote windows server?

In a remote server is there an option or way to start the K6 process / load test using an API or curl command. Example: I would like to start the k6 load test in machine 2 from machine 1
ArunPrasath
  • 153
  • 4
  • 17
0
votes
1 answer

K6 user and batch processing concept

How does k6 interpret the following case: I have two requests which I run in parallel with batch() and command line switch -u 4, that is 4 users. In that case is k6 running the 2 requests per user? that is 2x4 = 8 times ? And is that one user after…
microwth
  • 1,016
  • 1
  • 14
  • 27