Skip to content

Simple k6 load-test script against simple Golang server

Notifications You must be signed in to change notification settings

intlr/load-test

Repository files navigation

Load test

GoDoc Go Report Card

In this repository we explore load tests. It consists of what Bob Wescott described as the practice of modeling the expected usage of a software program by simulating multiple users accessing the program concurrently.

Using virtual users, we request our applications using different patterns we will describes below. Each virtual user simulate a user session and may perform tests on the response.

Tools

We are using k6 as the load test tool to describe and run our load tests. Using Grafana and InfluxDB we are following the actual tests such as the application throughput, the number of virtual users, the response time... And by using Docker and docker-compose, we are able to ship everything easily so that you can play with the k6 script without having to worry about how to install all those tools.

Getting started

$ docker-compose up -d

Usage

$ docker run --net=host -i loadimpact/k6 \
    run --out influxdb=http://localhost:8086/load - <script.js

Dashboard is available at http://localhost:3000/d/ooH6ce_Mz/load-test

Screenshot from 2021-04-16 20-22-47