Closed sertal70 closed 10 months ago
Hey @sertal70: 👋 - Thanks for helping to make the reporter better by raising this ticket. I will take a look as soon as I can and get back to you. Cheers, Danny.
I'm going to close this because the error was due to a missing JSON.parse()
when creating the Collection
object:
// right
const myCollection = new Collection(JSON.parse(fs.readFileSync('./my-collection.json').toString()));
//wrong
const myCollection = new Collection(fs.readFileSync('./my-collection.json').toString());
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Is There An Existing Issue
What Are You Seeing
Hi, I'm trying to execute runs with newman as library by loading a collection via SDK, in a way similar to:
When executed, this code generates the following error:
If the collection is passed to
newman.run()
as filename:the run completes ok and the report is produced as expected.
Is there any compatibility issue with the Postman Collection objects?
Steps To Reproduce The Issue
newman
,postman-collection
, 'newman-reporter-htmlextra`Collection
object innewman.run
, the other using the collection file name.Full Newman Command Or Node Script
HTMLEXTRA Version
1.23.0
Newman Version
6.1.0
Additional Context
No response