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
0 answers

How to make use of all the VUs in k6

I have a use case which I want to achieve in k6. Is it possible to send 36 requests per minute by 30 users at a rate limit of not more than 1 rps. I need to make use of all the 30 users for 1 minute. Can someone give an advice on this?
Joz
  • 35
  • 4
0
votes
0 answers

Content-type does not get updated although present in the postman request

Note: The postman request works fine I have done the following: Run the postman-to-k6 command : postman-to-k6 loadTest.postman_collection.json -o k6-script.js Run the k6 command with the http-debug flag to run the command k6 run --out…
Dharight
  • 71
  • 1
  • 8
0
votes
0 answers

API Automation for private APIs using K6 that cannot be directly called using postman

I have these APIs which I can manually test by calling the pod using port-forwarding but since APIs are scattered in different pods, I am not able to automate this. Is there a way in K6 where I can call each pod based on the API and automate my API…
Shoeb Khan
  • 21
  • 3
0
votes
2 answers

K6: How to apply custom resource in kubernetes?

Currently we could create configmaps, deployment, pods, jobs, namespaces, ingress. https://github.com/grafana/xk6-kubernetes But I would like to deploy custom resources. Is it possible?
Chin
  • 1
  • 1
0
votes
0 answers

K6 HTML report generation via command line

We had ran into use case where we need to generate a HTML report via command line which contains only end metrics of the test? From the knowledge articles could able to get only handle summary callback function but that doesn’t fits our need. Is…
Yadhav
  • 15
  • 3
0
votes
0 answers

k6 - Sending end summary only to Prometheus

I have k6 configured to send metrics to Prometheus, and for lower VU count all seems great, but for higher loads I start getting errors: error=“server returned HTTP status 429 Too Many Requests: the request has been rejected because the tenant…
0
votes
1 answer

Run parallel for loop to run k6 in posix

I need to run a parallel for loop in posix shell (not bash). But it is currently not executing in docker and skipping that statement on adding & to the for loop. Reference question with details: Shell script not running as bash using Dockerfile Code…
Sonali Agrawal
  • 303
  • 4
  • 14
0
votes
1 answer

Shell script not running as bash using Dockerfile

I need to split a comma-separated string into array and run k6 for each of the array values parallely. Since shell script doesn't support arrays, I m using bash command in the script. I am not able to run it as bash using Dockerfile in…
Sonali Agrawal
  • 303
  • 4
  • 14
0
votes
1 answer

Writing k6 outputs to Victoria Metrics

I'm using Victoria Metrics as a metric storage. I would like to use VM rather than using InfluxDB In this case I just port forwarded to my VM port then run; k6 run --out influxdb=http://127.0.0.1:8480/k6 click_performancetest.js…
Berkay Kirmizioglu
  • 1,134
  • 1
  • 11
  • 23
0
votes
1 answer

k6: How to create a Selection from an Element

Using Selection.each(fn) (see the k6 docs), the callback is passed an index and an Element. Element has a different API than Selection, and within the callback I’d like to use the Selection API on the passed Element so that I can operate on each…
jinglesthula
  • 4,446
  • 4
  • 45
  • 79
0
votes
1 answer

How to push request a CSRF Token in k6 performance testing tool - ReferenceError

I am quite new to k6 and load testing and I could not figure out why I am not able to push a token from one request to another, to test the login process in a Laravel-built web app. I hope somebody can help me out with this issue. So my script looks…
0
votes
0 answers

Identify files imported in k6 test script

We are using k6 as performance test engine. In k6 JS script there are ways to import to the other files which could be used for the test. Is there any way that extract the dependent files which are used in k6 script? For example: My test file is…
Yadhav
  • 15
  • 3
0
votes
0 answers

K6-reporter output doesn't seem correct

I am using the K6 reporter shown here: https://github.com/benc-uk/k6-reporter 2 questions... Should the threshold that failed be highlighted red in the grid below? Looking at this I have no idea which threshold failed and clicking on the red…
JD2775
  • 3,658
  • 7
  • 30
  • 52
0
votes
1 answer

How to override k6 CLI arguments from within the script?

I have a rather complicated setup which forces me to pass --duration and --vus to k6 CLI. It ends up looking like k6 run --vus 200 --duration 60s fixed-scenarios.js Because of this my custom scenarios are being overridden by a default scenario. Is…
LEQADA
  • 1,913
  • 3
  • 22
  • 41
0
votes
0 answers

Github action not executing shell script with K6

I have a shell script which runs k6 scenarios. This shell script successfully runs locally as well as on TeamCity via Docker. I m trying to setup github actions to run the Docker which runs the script so that each time a PR is merged, it runs. But…