1.0.5 • Published 3 years ago

k6-html-reporter v1.0.5

Weekly downloads
86
License
ISC
Repository
github
Last release
3 years ago

k6-html-reporter

A light weight html reporter for k6

Build Status Generic badge

Install

NPM:

npm install k6-html-reporter --save-dev

YARN:

yarn add k6-html-reporter --dev

Usage

  1. Install the package
  2. Create a js/ts file and specify the options:
const reporter = require('k6-html-reporter');

const options = {
        jsonFile: <path-to-json-report>,
        output: <path-to-output-directory>,
    };

reporter.generateSummaryReport(options);
    

for typescript

import {generateSummaryReport} from 'k6-html-reporter';

const options = {
        jsonFile: <path-to-json-report>,
        output: <path-to-output-directory>,
    };

generateSummaryReport(options);
  1. Output a JSON summary output with the handleSummary function provided by k6, more info.
export default function () { /** some tests here */}
export function handleSummary(data) {
  console.log('Preparing the end-of-test summary...');
  return {
      <path-to-json-report>: JSON.stringify(data),
  }
}

Note: The --summary-export=path/to/file.json run option is no longer recomanded after k6 v0.30.0.

  1. Run the code in step two as a node.js script after the test execution:
node xxxx.js

Sample report:

Alt text

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1-BETA

3 years ago

1.0.0-beta

3 years ago