Skip to content

Seolhun/web-performance-tester

Repository files navigation

Web-Performance-Tester

This is automation performance tester using lighthouse and chrome-launcher

Install

npm install @seolhun/web-performance-tester
# or
yarn add @seolhun/web-performance-tester

Goal

  • One configuration, All routes are audited.
  • Simple testing flow with the json file configuration

About Lighthouse contents

Read lighthouse contents, Here

Config Options

JSON

Set WPT configuration

// wpt.config.json
{
  "name": "Seolhun_Github"                  // Required
  "origin": "https://github.com/Seolhun",   // Required
  "auditPaths": [{
    {
      "name": "web-performance-tester",
      "pathname": "/web-performance-tester"
    }
  }],                                       // Required                        
  "timeout": 30000,                         // default : 30000
  "useReporter": true,                      // default : true
  "options": {
    "chromeFlags": ["--headless"],          // default : ["--headless"]  - ["--show-paint-rects", "--headless", "--disable-gpu"]
    "formFactor": "desktop",                // default : "mobile"       - desktop, mobile
    "output": "html",                       // default : "html"         - json, html, csv
    "outputPath": "reports",                // default : "reports"
    "port": 8080                            // default : 8080
  },
}

How to Development

Install

npm install

Build

npm run build

Run example

npm run lh

Examples