https://github.com/fabsrc/artillery-plugin-faker
🎲 Makes faker.js available for Artillery loadtest configurations.
https://github.com/fabsrc/artillery-plugin-faker
artillery artillery-faker faker hacktoberfest loadtest plugin
Last synced: 11 months ago
JSON representation
🎲 Makes faker.js available for Artillery loadtest configurations.
- Host: GitHub
- URL: https://github.com/fabsrc/artillery-plugin-faker
- Owner: fabsrc
- License: mpl-2.0
- Created: 2017-10-01T10:54:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-02-23T10:41:32.000Z (over 1 year ago)
- Last Synced: 2025-06-14T11:06:48.029Z (12 months ago)
- Topics: artillery, artillery-faker, faker, hacktoberfest, loadtest, plugin
- Language: JavaScript
- Homepage:
- Size: 837 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Artillery Plugin Faker
[](https://github.com/fabsrc/artillery-plugin-faker/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/artillery-plugin-faker)
[](https://standardjs.com)
Makes [faker.js](https://github.com/faker-js/faker) available for [Artillery](https://artillery.io/) load test configurations.
## Install
```sh
$ npm install -g artillery-plugin-faker
```
## Usage
Add the plugin to your load test configuration:
```yaml
config:
plugins:
faker:
locale: en
```
### Options
- `locale` (default: `en`) sets the locale of _faker.js_.
### Example
Using a string prefixed with `$faker.` as variable value will result in a random variable value returned by the indicated _faker.js_ function.
```yaml
config:
target: "http://localhost:3000"
phases:
- duration: 10
arrivalRate: 1
plugins:
faker:
locale: en
variables:
firstName: "$faker.name.firstName"
scenarios:
- flow:
- log: "Making request with query: {{ firstName }}"
- get:
url: "/search?q={{ firstName }}"
```
For a complete list of available _faker.js_ functions, have a look at the [faker.js documentation](https://fakerjs.dev/api/). Please note that no parameters can be passed to the _faker.js_ functions at this time.
_Have a look at the `example.yml` file for a fully working example._