All Projects → benc-uk → k6-reporter

benc-uk / k6-reporter

Licence: MIT license
Output K6 test run results as formatted & easy to read HTML reports

Programming Languages

EJS
674 projects
javascript
184084 projects - #8 most used programming language
go
31211 projects - #10 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to k6-reporter

k6-action
k6 is now available as a GitHub Action
Stars: ✭ 64 (-60%)
Mutual labels:  load-testing, k6
k6-template-es6
Template repository for bundling test projects into single test scripts runnable by k6
Stars: ✭ 39 (-75.62%)
Mutual labels:  load-testing, k6
jmeter-to-k6
Converts JMeter .jmx files to k6 JS code
Stars: ✭ 57 (-64.37%)
Mutual labels:  load-testing, k6
k6-template-typescript
Template to use TypeScript with k6
Stars: ✭ 90 (-43.75%)
Mutual labels:  load-testing, k6
bounded-disturbances
A k6/.NET red/green load testing workshop
Stars: ✭ 39 (-75.62%)
Mutual labels:  load-testing, k6
postman-to-k6
Converts Postman collections to k6 script code
Stars: ✭ 269 (+68.13%)
Mutual labels:  load-testing, k6
memcheck-cover
An HTML generator for Valgrind's Memcheck tool
Stars: ✭ 30 (-81.25%)
Mutual labels:  html-report
apistress
Very simple stress testing tool for API
Stars: ✭ 22 (-86.25%)
Mutual labels:  load-testing
Bombardier
Fast cross-platform HTTP benchmarking tool written in Go
Stars: ✭ 2,952 (+1745%)
Mutual labels:  load-testing
Httprunner
One-stop solution for HTTP(S) testing, written in Python.
Stars: ✭ 2,628 (+1542.5%)
Mutual labels:  load-testing
jetty-load-generator
jetty-project.github.io/jetty-load-generator/
Stars: ✭ 62 (-61.25%)
Mutual labels:  load-testing
jmeter-grpc-request
JMeter gRPC Request load test plugin for gRPC
Stars: ✭ 137 (-14.37%)
Mutual labels:  load-testing
xk6-browser
k6 extension that adds support for browser automation and end-to-end web testing via the Chrome Devtools Protocol
Stars: ✭ 204 (+27.5%)
Mutual labels:  k6
jagtester
Express server load tester with middleware level data reporting
Stars: ✭ 57 (-64.37%)
Mutual labels:  load-testing
benchmark-thrift
An open source application designed to load test Thrift applications
Stars: ✭ 41 (-74.37%)
Mutual labels:  load-testing
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (-74.37%)
Mutual labels:  load-testing
Ali
Generate HTTP load and plot the results in real-time
Stars: ✭ 3,055 (+1809.38%)
Mutual labels:  load-testing
hurl
http(s)+h2 server load tester
Stars: ✭ 143 (-10.62%)
Mutual labels:  load-testing
mocha-simple-html-reporter
Simple HTML reporter for Mocha
Stars: ✭ 16 (-90%)
Mutual labels:  html-report
mattermost-load-test-ng
Mattermost next generation loadtest agent
Stars: ✭ 46 (-71.25%)
Mutual labels:  load-testing

K6 HTML Report Exporter v2

🔥 Note.

This a complete rewrite/overhaul of the existing report converter, now written in JavaScript to be integrated into the test. This is a more elegant method than the offline conversation process. The previous code has been moved to the 'archive' folder.

The report will show all request groups, checks, HTTP metrics and other statistics

Any HTTP metrics which have failed thresholds will be highlighted in red. Any group checks with more than 0 failures will also be shown in red.

Usage

This extension to K6 is intended to be used by adding into your K6 test code (JavaScript) and utilizes the handleSummary callback hook, added to K6 v0.30.0. When your test completes a HTML file will be written to the filesystem, containing a formatted and easy to consume version of the test summary data

To use, add this module to your test code.

Import the htmlReport function from the bundled module hosted remotely on GitHub

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

Note. Replace main with a version tag (e.g. 2.2.0) to use a specific version

Then outside the test's default function, wrap it with the handleSummary(data) function which K6 calls at the end of any test, as follows:

export function handleSummary(data) {
  return {
    "summary.html": htmlReport(data),
  };
}

The key used in the returned object is the filename that will be written to, and can be any valid filename or path
Note. This is a change in the v2.1.1 release

The htmlReport function accepts an optional options map as a second parameter, with the following properties

title    string  // Title of the report, defaults to current date

Multiple outputs

If you want more control over the output produced or to output the summary into multiple places (including stdout), just combine the result of htmlReport with other summary generators, as follows:

// This will export to HTML as filename "result.html" AND also stdout using the text summary
import { htmlReport } from "https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js";
import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.1/index.js";

export function handleSummary(data) {
  return {
    "result.html": htmlReport(data),
    stdout: textSummary(data, { indent: " ", enableColors: true }),
  };
}

Screenshots

main report screenshot

another report screenshot

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].