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-InfluxDB-Docker- msg="Couldn't write stats" - connect: connection refused"

My question about docker is limited. What I am trying to do it run the K6 load test in the docker container 2)save the results in influxdb create custom dashboards in grafana My K6 script is ready. I downloaded docker desktop on my windows OS,…
Jay
  • 339
  • 1
  • 7
  • 23
0
votes
1 answer

ModuleSpecifier Error while running K6 script in docker

I have limited knowledge of docker. But this is what I have done. I installed docker desktop. Pulled images for influxdb 1.8 and grafana and loadimpact/k6. Created containers for influxdb and grafana which are running fine. http://localhost:3000/ ->…
Jay
  • 339
  • 1
  • 7
  • 23
0
votes
1 answer

K6 - breakup of results for each api request

I am working on developing load testing for one workflow using HTTP request calls. In the workflow, the response of one API call is used in the next API's call either as a parameter or as a request body. So, the sequence in which API is called is…
Jay
  • 339
  • 1
  • 7
  • 23
0
votes
1 answer

Postman-to-k6 tool - The "path" argument must be of type string. Received an instance of Array

I am trying to convert the postman collection to K6 using the utility postman-to-k6. postman-to-k6 works perfectly fine and converts the collection to k6.js script when the collection has simple requests like Get and Post with simple key value pair…
Jay
  • 339
  • 1
  • 7
  • 23
0
votes
2 answers

Why number of iterations should not smaller than vus in K6 testing? And the meaning of this property

I'm newbie in testing with K6. I have read the document of K6 but i'm not clear about "vus" and "iterations". I'm understand that vus = number of people go to the URL that declared, but I'm not sure about "iterations". Can anyone help me to explain…
0
votes
1 answer

How to run post request for multiple user in k6 performance test?

We run Get http request with multiple user(vus) and multiple iteration(iterations) for particular duration. It is straightforward like below. import http from 'k6/http'; import { sleep } from 'k6'; export let options ={ vus:'10', duration:…
Samselvaprabu
  • 16,830
  • 32
  • 144
  • 230
0
votes
1 answer

K6 test execution behavior

Hello everyone. I am new to K6 and have a question regarding test execution. For example i have some small test with given config. export const options = { stages: [ { target: 10, duration: '30s'} ]} when i run test with this config, at the…
Taras Fityo
  • 77
  • 1
  • 10
0
votes
1 answer

Want to test the server with logged data

I am logging raw http requests to kafka. GET /api/v1/user GET /api/v1/friends POST /api/v2/problem/solve HTTP/1.1 Host: domain.com Content-Length:111 Cookie:... { "input":"{...}" } Obstruction, such as sessions and JWT tokens, will modify the…
deny1311
  • 1
  • 2
0
votes
1 answer

k6 on project running on docker

I'm trying to run some tests using k6 on my project running on docker. I added this to my docker-compose.yml : k6: image: loadimpact/k6:latest command: run /test.js volumes: - ./tests/test.js:/test.js It runs my test when I…
0
votes
1 answer

Using K6 to test page speed between two URLs

I am trying to get a script working that will test the page speed between two URls and give me some useful data. I'm using the K6 performance testing suite to do this with, I'm writing the scripts in javascript using their framework. I am curious…
MaylorTaylor
  • 4,671
  • 16
  • 47
  • 76
0
votes
1 answer

What should I consider in analyzing test results from k6 cloud?

I am new to k6. I just created a script for a single scenario then I ran it locally via Visual Studio Code in my computer and I integrated the results in k6 cloud using –out cloud command in terminal upon execution. My script was configured to run…
Lars
  • 51
  • 1
  • 8
0
votes
1 answer

Why postman test cannot pass after converting to k6 script

I have this very simple postman request that has a single pm.test(). This passes fine when running from postman. After converting to k6 script, it does not pass. I can't figure it out. What is wrong with it? Using the postman-to-k6 npm module.
Andy N
  • 1,013
  • 9
  • 25
0
votes
1 answer

How to set cookieJar in JMeter

In K6, I am setting cookieJar as below const jar = http.cookieJar(); jar.set('https://auth.mygateid.test', 'oktaStateToken', oktaStateToken); Is there a way to do this in JMeter ? Is it really required in Jmeter?
Vishal
  • 339
  • 1
  • 9
  • 26
0
votes
1 answer

How to pass K6 Tool data modified in default function to teardown stage

K6 Tool is being used for our testing needs. For the sample snippet below when run with K6, we see that the change occurred in default function for data passed from setup is not affected and visible in tear down stage. Is there any other possible…
Chaitanya P
  • 120
  • 7
0
votes
1 answer

fetch the jwt value from Set-Cookie header in typescript

I am using javascript k6 load testing tool to make a http.post request to our application server. The server sends me a response back and it also sends the response headers. One of the response headers is the below Set-Cookie header sent back to…