cucumberjs-rest-assured is an API automation testing library for JavaScript/TypeScript that supports Cucumber and Mocha frameworks. Current version 0.0.21 (2023) allows making HTTP requests (GET, POST, PUT, PATCH, DELETE), implicit Chai assertions for JSON responses, JSON path validations, FormData file uploads, and externalizing request/response JSON files. It ships TypeScript types and supports CommonJS, ES6, and ESM. Active development with planned integrations like TestRail.
npm install cucumberjs-rest-assuredNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows making a POST request with auth header, printing formatted JSON, and retrieving a JSON path value using the utils.
No fix needed, but you can manually enforce shorter timeouts if necessary.
Consider migrating to 'rest-assured-ts' for continued support.
Always parse JSON body first: JSON.parse(response.body)
Ensure headers are an object: JSON.parse(JSON.stringify({...}))Run 'npm install cucumberjs-rest-assured' and import as specified.
Check response structure; use JSON.stringify if needed.
Update to latest version (>=0.0.21) and ensure named import.
Use: import { makeHttpRequest } from 'cucumberjs-rest-assured' or const { makeHttpRequest } = require('cucumberjs-rest-assured');