Skip to content

CLI package to create a Stubby data .json file based on a HAR file

License

Notifications You must be signed in to change notification settings

jmpadron/har-to-stubby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

har-to-stubby

CLI package to create a Stubby data .json file based on a HAR file.

Use Cases

This package allows you to convert the HTTP browser's interactions into mock data. You can find it useful in, among others, these situations:

  • A starting point for a mock server.
  • Recreate on your local mock server something that's happening in another environment.

Installation

npm install -g har-to-stubby

Test

npm run test

CLI Arguments

 Mandatory arguments:
    --source                    .har file location
    --destination               stubby data file output location(it will be overridden if exist)

Optional arguments:
    --filter-urls-by-regexp     If present, only urls that match will be take into consideration
    --with-request-params       If present, query params and post data will be included in the mock

Example

har-to-stubby --source "./test-data/localhost.har" --destination "./test-data/localhost.json" --filter-urls-by-regexp "/cool-api/g" --with-request-params

About

CLI package to create a Stubby data .json file based on a HAR file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages