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

Can I create K6 load test for the video stream

My project has pages with videos added from youtube. Can I do simulation using k6 that virtual users see those videos?
Tomash Gombosh
  • 143
  • 1
  • 3
  • 18
0
votes
1 answer

In K6 - How to break the TPS at individual transactions within a single script

I would like to achieve different set of TPS at different API calls within the single script. Currently i am using stages, minIterationDuration and sleep function for think time. However using different set of think time at API level doesn't help…
ArunPrasath
  • 153
  • 4
  • 17
0
votes
1 answer

Thresholding the deviation in `http_req_duration` with k6?

I want to create a custom metric with k6 for load testing of a service. I want to measure the deviation between the http_req_duration between the old version (before the code change), and the new version (with the code change), and put a threshold…
Katie
  • 811
  • 1
  • 10
  • 15
0
votes
1 answer

k6: WARpanic: runtime error: invalid memory address or nil pointer dereference

I'm trying to run a Performance TEst with a tool named K6 (free and open-source load testing tool), my test is about to test a Website Performance, and when I run the Test I got this: WARN[0029] Request Failed error="Get…
otmann
  • 37
  • 2
  • 17
0
votes
1 answer

understanding vu metrics and statistics

I was running load tests and the final statistics showed the number of requests http_reqs..................: 77 when I executed the test for 100 VUs with 2 iterations. 77 requests is the amount that supposed to be done by a single user so I…
lapots
  • 12,553
  • 32
  • 121
  • 242
0
votes
1 answer

different options for different groups in k6

I have to rewrite .jmx file to k6. The migration tool did not work. In .jmx file there was a test plan with two thread-groups. Each thread group has different number of threads and loop counts. Originally I wanted to do it like this export default…
lapots
  • 12,553
  • 32
  • 121
  • 242
0
votes
1 answer

Execute functions once for all Threads

Logger function called by multiple threads(virtual users).I want to execute function printDebugLogs(debugLogsRepo) and printResponseCodeRepo(responseCodeRepo) only after given duration passed i.e when IsElapsedTime return true.Currently all threads…
Sanjay
  • 59
  • 1
  • 8
0
votes
1 answer

How do I properly provide auth token in header so that graphql does not redirect to login page?

Within my QA org, I have been asked to build a JavaScript test file to call our graphQL endpoints using k6 (loadimpact). I am generating our auth token successfully and adding it to the header of the call I'm making. But for some reason I'm being…
Jason
  • 41
  • 8
0
votes
1 answer

Jenkins console not outputting some "special" characters like ✗, and ✓

When running a load test using k6, the output is hard to read because many characters are not output correctly. Specifically it's "special" characters like ✗, and ✓ The output looks like this: The output is in the "Console" section viewed in a…
jhnclvr
  • 9,137
  • 5
  • 50
  • 55
0
votes
2 answers

how to get path for import of javascript from file

I have a file where i defined the absolute path of directory. Ex : script=/absolutepath/scripts utility=/absolutepath/utility I want to use "script"/"utility" instead of absolute path in other javascript files.How i can do this. What i want…
Sanjay
  • 59
  • 1
  • 8
0
votes
1 answer

How i can use absolute path in k6 load testing framework

I want to use absolute path in k6 js script file. Can someone please help in how to do this? Instead of this import {getAddCookieInfoPayLoad} from "../../../scripts/oAuth/addCookieInfoScript.js"; import {getQueryCookieInfoPayLoad} from…
Sanjay
  • 59
  • 1
  • 8
0
votes
1 answer

K6 with DynamoDB

K6 can be used with InfluxDB for data storage and Grafana for visualization. k6 run --out influxdb=http://localhost:8086/myk6db script.js In our project, we are using DYNAMO DB. Does K6 supports integration with DynamoDB instead of InfluxDB ?
Vishal
  • 339
  • 1
  • 9
  • 26
0
votes
1 answer

Most effective way to populate database with data?

Hi I need to run some performance tests of my spring boot batch jobs. I am looking for the most effective way to set the data into the mongo database. The data is encrypted in the service, so I cant directly load the data via mongo. I want to…
qwertyqwerty
  • 207
  • 5
  • 15
0
votes
0 answers

What is Key value in PFX Certificate

what will be the Key value for my PFX certificate, i am using password as string and then getting error failed to find any PEM data in certificate input - Also want to know is there any sample code to pass key, What would be key for my certificate,…
0
votes
1 answer

disable some calls in default function

export default function() { http.get(api_1); http.get(api_2); http.get(api_3); }; I want to disable the request for api_2.I want to do this by passing some parameters during the k6 script execution.Is k6 provide some support for this? I tried using…
Sanjay
  • 59
  • 1
  • 8