http-requests-tester

1.2.4 • Public • Published

HTTP requests tester

It's a CLI HTTP tester based on HTTP client and HTTP tests implemented in PHPStorm.

Github repo: https://github.com/nitool/http-requests-tester

NPM package: https://www.npmjs.com/package/http-requests-tester

Installation and usage

Install:

npm install -g http-requests-tester

Usage:

npx http-requests-tester --selected-client clientName --client-file rest-client.env.json test_file.http 

Test file example:

# Example test
GET http://httpbin.org/status/200
Accept: text/plain

> {%
    client.test('example test set', function () {
        client.log('example log')
        client.assert(response.status === 200, 'it does not work')
    })
%}

Status:

It works but work is still in progress. Package needs refactor and unit tests.

Resources:

Options:

--client-file=path_to_file.json - config file with possible clients
--selected-client='name' - each client file can contain multiple clients, this options is required and selects config to use while making request
--help|-h - shows help message
--verbose|-v - show logs, by default only errors are printed out
--autolog-response - logs every received response when verbose is enabled

Package Sidebar

Install

npm i http-requests-tester

Weekly Downloads

4

Version

1.2.4

License

ISC

Unpacked Size

52.9 kB

Total Files

29

Last publish

Collaborators

  • snitool