Hi @danny-dainton . After running my command , I’m able to receive htmlextra and html-extended report. But the printed Request and response body of all iterations are same in the html-extended and htmlextra report. It is printing the last request body response body in the report. Could you please help me to figure out the problem and fix it. Anyone with same issue , please help me regarding this.
The HTML reporters have a limitation where they overwrite request/response data from previous iterations instead of storing each iteration’s data separately. This results in all iterations showing the same (last) request/response in the report.
Solutions & Workarounds
1. Use JSON Reporter for Detailed Data
newman run collection.json -d data.csv --reporters json,htmlextra --reporter-json-export results.json --reporter-htmlextra-export report.html
The JSON report will contain all iteration data that you can analyze separately.
2. Custom Logging in Collection
Add this to your Tests tab to capture iteration-specific data:
// Log iteration-specific data
const iterationNum = pm.info.iteration + 1;
console.log(`=== ITERATION ${iterationNum} ===`);
console.log("Request Body:", pm.request.body ? pm.request.body.raw : "No body");
console.log("Response Body:", pm.response.text());
console.log("Status Code:", pm.response.code);
console.log("========================");
// Store in variables for potential access
pm.globals.set(`iteration_${iterationNum}_request`, pm.request.body ? pm.request.body.raw : "");
pm.globals.set(`iteration_${iterationNum}_response`, pm.response.text());
3. Use CLI Reporter for Console Output
newman run collection.json -d data.csv --reporters cli,json --reporter-json-export detailed-results.json
The CLI output will show real-time data for each iteration.
4. Alternative: Use Multiple Single-Iteration Runs
Instead of running multiple iterations in one command, run single iterations:
# For each row in your data file
newman run collection.json -d data-row1.csv --reporters htmlextra --reporter-htmlextra-export report-iteration1.html
newman run collection.json -d data-row2.csv --reporters htmlextra --reporter-htmlextra-export report-iteration2.html