This tool can be used to send multiple requests to an API. Each reqest sends data from a predefined array.
- API testing
- data migration
Node version >= 18.16.0
- create a folder in the project root directory to store all related files for example pusher
- create frodo.settings.js file in the root project directory
module.exports = {
comments: {,
outputDirectory: 'Directory to store output files',
saveDirectory: 'Directory to store save files',
},
outputDirectory: './pusher/output/',
saveDirectory: './pusher/save/',
};
- start sending requests using
npx frodo .\pusher\config\sample.config.json .\pusher\data\sample.data.json
{
"comments": {
"id": "Project id - should be unique",
"requestEndpoint": "URL to push data to",
"requestHeaders": "HTTP headers to be added to each request",
"requestMethod": "Push method to be used",
"requestsInBatch": "Concurent request count",
"requestPercent": "How much data from the data json should be pushed in percent",
"compareKeyName": "Key from the data object to be used for matching agains the response in the output log"
},
"id": "dev-test",
"requestEndpoint": "http://127.0.0.1:8888/api_mock",
"requestHeaders": {
"content-type": "application/json",
"X-Token": "123asd456"
},
"requestMethod": "post",
"requestsInBatch": 2,
"requestPercent": 50,
"compareKeyName": "id"
}
Option | Value | Description |
---|---|---|
id |
string |
Project id - should be unique |
requestEndpoint |
string |
URL to push data to |
requestHeaders |
object |
HTTP headers to be added to each request |
requestMethod |
string |
Push method to be used |
requestsInBatch |
number |
Concurent request count |
requestPercent |
number |
How much data from the data json should be pushed in percent |
compareKeyName |
number |
Key from the data object to be used for matching agains the response in the output log |
- v0.1.0
- push as an npm package
If you find this piece of code to be useful, please consider a donation :)