jest-html-reporter icon indicating copy to clipboard operation
jest-html-reporter copied to clipboard

How can we capture Request Payload & Response Json and show them to jest-html-reporter for REST API Automation framework?

Open ersinghrajkr opened this issue 2 years ago • 1 comments

How can we capture Request Payload & Response Json and show them to jest-html-reporter for REST API Automation Framework using supertest and jest with typescript.

Here is my configuration - reporters: [ //https://github.com/Hargne/jest-html-reporter/wiki/configuration 'default', ["./node_modules/jest-html-reporters", { "pageTitle": "API Test Report", "includeFailureMsg": true, "includeStackTrace": true, "includeConsoleLog": true, "includeSuiteFailure": true, "darkTheme": true, "logoImgPath": null, "openReport": false, "urlForTestFiles": "", "customInfos": [ { title: "Environment", value: "QA"}, {title: "Browser", value: "Chrome"}, {title: "App Version", value: "2.0"}, {title: "Automation Script Link", value: "some url"}, ], "executionTimeWarningThreshold": 5, "dateFormat": "yyyy-mm-dd HH:MM:ss", "sort": "default", "filename": "rest-api-result.html", "publicPath": 'reports' }],

ersinghrajkr avatar Aug 30 '23 03:08 ersinghrajkr

Hi,

I may have misunderstood what you want to achieve, but this module only extends the result given by the test suites you write with Jest to generate a visual report. Hence, there is no way of manipulating the way the tests are performed.

Hargne avatar Sep 12 '23 05:09 Hargne