Loadtest web service with k6

Image for post
Image for post
Photo by Julian Villella on Unsplash
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61echo "deb https://dl.bintray.com/loadimpact/deb stable main" | sudo tee -a /etc/apt/sources.listsudo apt-get updatesudo apt-get install k6
$ npm init --yes# install the k6 types as dev dependency$ npm install --save-dev @types/k6
  • Apache Kafka
  • InfluxDB + Grafana
  • Cloud
  • CSV
  • Data Dog
docker run -p 8086:8086 \
-v $PWD:/var/lib/influxdb \
influxdb
sudo apt-get install -y adduser libfontconfig1
wget https://dl.grafana.com/oss/release/grafana_7.3.4_amd64.deb
sudo dpkg -i grafana_7.3.4_amd64.deb
export let options = {

vus: 1000,

duration: '300s',

};
k6 run --insecure-skip-tls-verify --out influxdb=http://localhost:8086/k6db script.js
--insecure-skip-tls-verify
Image for post
Image for post

Written by

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store