• Stars
    star
    119
  • Rank 296,801 (Top 6 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

load test puppeteer (Headless Chrome API) script using node

puppeteer-loadtest

Build Status

NPM

puppeteer-loadtest provides a simple way to launch multiple puppeteer instances in parallel to run a simple load test on your site.

Installation

Install via npm:

$ npm install -g puppeteer-loadtest

Usage

To run a basic load test, just supply the name of a puppeteer script to run:

$ puppeteer-loadtest --file=sample.js

This will run the specified puppeteer script once in chrome headless instance.

Parameters

--s flag is to mention sample size --c flag is to mention number of concurrent executions per sample --silent boolean to enable or disable logs --outputFile send performance results to output file

$ puppeteer-loadtest --s=100 --c=25 --file=sample.js

This will run a total of 100 runs through the specified puppeteer script across 25 concurrent chrome headless instances.

Examples

$ puppeteer-loadtest --file=sample.js

$ puppeteer-loadtest --file=./test/sample.js  --s=100 --c=25

$ puppeteer-loadtest --file=./test/sample.js  --s=100 --c=25 --silent=true

$ puppeteer-loadtest --file=./test/sample.js  -s 100 -c 25

$ puppeteer-loadtest --file=./test/sample.js  -s 100 -c 25 --outputFile=performance.json

use as node module

```
const startPuppeteerLoadTest = require('puppeteer-loadtest');
const results = await startPuppeteerLoadTest({
    file, // path to file
    samplesRequested, // number of samples requested
    concurrencyRequested, // number of concurrency requested
});
console.log(results);
```

Contributors

David Madden

yuji38kwmt

Feedback

please provide feedback or feature requests using issues link

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

More Repositories

1

Ramayana_Book

Ramayana Book ( One of the two great epics of Hinduism ) ascribed by Valmiki
JavaScript
69
star
2

execution-time

node.js utility to measure execution time in code
JavaScript
23
star
3

countries-information

Get Country codes, Currency Codes, emojis, languages, phone numbers, search countries and more
JavaScript
14
star
4

qr-filetransfer

Transfer files over wifi (or) internet from your computer to your mobile device by scanning a QR code without leaving the terminal.
JavaScript
12
star
5

ultimate-chai

Chai library with cross mixture of sinon-chai, dirty-chai, chai-as-promised included
JavaScript
6
star
6

playwright-loadtest

load test playwright script using node
JavaScript
5
star
7

LessMixins

Commonly used Less Mixins Template
CSS
2
star
8

GiftCard

Gift card implementation with PHP and QR code
2
star
9

themoviedb-api-client

Node js client for TheMovieDB (TMDB)
JavaScript
2
star
10

Ultimate-Accessibility-guide-for-web-apps

Ultimate Accessibility guide for web apps
1
star
11

Privacy

Opt out of sharing your private information with certain business affiliates
1
star
12

YTjs

Youtube API v3 Universal Javascript Library for nodeJS, AMD and browser which provides easy API
JavaScript
1
star
13

enforce-package-updates

Enforce packages updates for node
JavaScript
1
star
14

Ideas

Share your ideas and turn into a product
1
star
15

casperjs-loadtest

loadtest casperjs script using node
JavaScript
1
star
16

material-ui-with-express

Material UI with express boilerplate
JavaScript
1
star
17

node-webhook-cast

Play music on google cast devices using IFTTT or any webhook supported sites
JavaScript
1
star
18

json-remote-search

Downloads remote json, keeps cache and provides searching api for it
JavaScript
1
star