Star

Created With

linkResponse Body Validation Overview



linkExact Value

Check the response body exactly matches some value

1link# TODO



linkJSON Path

linkExact Value

Check the property at the specified path matches an exact value:

1link - name: get users

2link request:

3link path: /users

4link method: get

5link response:

6link json_data:

7link - path: $.[0].firstName

8link value: john



linkRegular Expression

Check for a regex match at the specified path:

1link - name: get users

2link request:

3link path: /users

4link method: get

5link response:

6link json_data:

7link - path: $.[0].zipcode

8link value: !!js/regex /^\d{5}$/

See also: Example: Validation of JSON Data



Response Body Validation OverviewExact ValueJSON PathExact ValueRegular Expression

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