Giter VIP home page Giter VIP logo

testkube-executor-k6's Introduction

ℹī¸ This repository has been archived on favour of the now official TestKube K6 Executor

Welcome to TestKube K6 Executor

TestKube k6 Executor is a test executor to run k6 load tests with TestKube.

Usage

First, you need to register and deploy the executor in your cluster. Additionally, you may deploy InfluxDB as well as Grafana if you need detailed performance data from your tests.

kubectl apply -f k8s/k6-executor.yaml
kubectl apply -f k8s/k6-influxdb.yaml
kubectl apply -f k8s/k6-grafana.yaml

Now we're ready to create and run your K6 scripts by passing as a file. Have a look at the k6 documentation for details. Here is an example load script.

import http from 'k6/http';
import { sleep } from 'k6';

export default function () {
  http.get('https://test.k6.io');
  sleep(1);
}

Issue the following commands to create and start the script:

kubectl testkube scripts create --file examples/k6-test-script.js --type "k6/script" --name k6-test-script

# this will basically run 'k6 run k6-test-script.js'
kubectl testkube scripts start k6-test-script

# this will basically run 'k6 run --vus 2 --duration 10s k6-test-script.js'
kubectl testkube scripts start k6-test-script -p vus=2 -p duration=10s

# this will basically run 'k6 run --out influxdb=http://influxdb-service:8086/k6 k6-test-script.js'
# make sure you have the k6 influxdb deployed
kubectl testkube scripts start k6-test-script -p out=influxdb=http://influxdb-service:8086/k6

# alternatively, the performance metrics can be published to Prometheus
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm install prometheus prometheus-community/prometheus -n testkube

# also, we need to compile a special k6 binary, will be part of the runner image
# see https://k6.io/docs/results-visualization/prometheus/

Maintainer

M.-Leander Reimer (@lreimer), [email protected]

License

This software is provided under the MIT open source license, read the LICENSE file for details.

testkube-executor-k6's People

Contributors

lreimer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.