Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svenkatreddy/puppeteer-loadtest
load test puppeteer (Headless Chrome API) script using node
https://github.com/svenkatreddy/puppeteer-loadtest
automation chrome chrome-headless loadtest puppeteer
Last synced: 3 days ago
JSON representation
load test puppeteer (Headless Chrome API) script using node
- Host: GitHub
- URL: https://github.com/svenkatreddy/puppeteer-loadtest
- Owner: svenkatreddy
- License: apache-2.0
- Created: 2017-08-17T20:30:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-20T14:08:48.000Z (about 1 year ago)
- Last Synced: 2024-04-14T19:54:34.843Z (8 months ago)
- Topics: automation, chrome, chrome-headless, loadtest, puppeteer
- Language: JavaScript
- Homepage:
- Size: 316 KB
- Stars: 116
- Watchers: 5
- Forks: 21
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# puppeteer-loadtest
[![Build Status](https://travis-ci.org/svenkatreddy/puppeteer-loadtest.svg?branch=master)](https://travis-ci.org/svenkatreddy/puppeteer-loadtest)
[![NPM](https://nodei.co/npm/puppeteer-loadtest.png?stars=true)](https://nodei.co/npm/puppeteer-loadtest/)
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](https://github.com/moose56)
[yuji38kwmt](https://github.com/yuji38kwmt)
## Feedbackplease 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