Star

Created With

linkCommand Line Interface (CLI)

Basic usage:

1link$rest-ez [options] <path(s)>

Invoke rest-ez from command-line:

1link$./node_modules/.bin/rest-ez

Test Suite path/pattern/directory is not specified, Looking for suites in specs directory No test suites found

By default REST-EZ looks for specs in the specs/ folder



linkDebugging

You can optionally log all info about failed requests using --reporter-options logRequests.

Log all failed requests in an HTML report:

1link$./node_modules/.bin/rest-ez --reporter html --reporter-options logRequests

Log all failed requests in a JSON report:

1link$./node_modules/.bin/rest-ez --reporter json --reporter-options logRequests

⚠️ Currently, use of logRequests option only works with a reporter specified, as the example above.



linkRunning Suites in Parallel

When you have lots of test suites, it might take a while to execute all of them serially.

To reduce the test execution time, REST-EZ is built with parallelism. You can invoke rest-ez with --parallel option to trigger parallel execution mode. All reporters respect parallel mode and generate correct reports with properly mapped errors if any.

This is how you can execute suites in parallel with rest-ez

1link$./node_modules/.bin/rest-ez --parallel 8

Above command will start test execution in parallel mode with 8 suites at a time.

⚠️ NOTE: maximum number of suites supported in parallel is 24



Command Line Interface (CLI)DebuggingRunning Suites in Parallel

Home

Getting Startedchevron_right
Basicschevron_right
Requestchevron_right

Request Basics Headers Cookies Query Parameters Path Parameters

Payload Bodychevron_right

File Uploads Auto-Retry Additional Options

Response Validationchevron_right

Overview

Assertionschevron_right

Status Code Headers & Cookies

Bodychevron_right
Hooks & JSchevron_right

Overview

Function Typeschevron_right
Suite-Level Hookschevron_right
Spec-Level Hookschevron_right
Contextchevron_right
DRY & Reusing Specschevron_right
Command Line Interface (CLI)chevron_right