Skip to content

Arghajit47/LoadTesting-k6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Load Testing

This is an Load Testing Repository for the beginners.

For Installation follow the link: K6 Setup

HTML Report: Link

import { htmlReport } from https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js

K6 Dashboard:

View the Dashboard file

To know more about Web Dashboard

K6 Environment Variables

Environment Variable Description Default Value
K6_WEB_DASHBOARD Enable the web dashboard false
K6_WEB_DASHBOARD_HOST Host to bind the web dashboard to localhost
K6_WEB_DASHBOARD_PORT Port to bind the web dashboard to 5665
K6_WEB_DASHBOARD_PERIOD Period in seconds to update the web dashboard 10s
K6_WEB_DASHBOARD_OPEN Open the web dashboard in the default browser false
K6_WEB_DASHBOARD_EXPORT Filename to automatically export the HTML test report to at the end of the test run. By default, the value is empty and the report isn’t exported. ``

To run Load Testing script (with Web Report > html-report.html):

K6_WEB_DASHBOARD=true K6_WEB_DASHBOARD_EXPORT=html-report.html k6 run script.js

To run testing script and monitor the data in local dashboard, we have implemented Grafana local dashboard.

  1. navigate inside LoadTesting directory

    cd LoadTesting

  2. Setting up docker compose file, which triggers grafana in localhost:3000 and influxdb in system's localhost:8086

    docker compose up -d influxdb grafana

  3. To run any of the scripts, the script needs to be inside the /scripts folder of LoadTesting directory.

    docker compose run k6 run /scripts/{scriptName}

About

This is a repository with K6-Grafana load Testing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published