newman icon indicating copy to clipboard operation
newman copied to clipboard

Access iterationData from summary object

Open sup-engineer opened this issue 6 years ago • 2 comments

  1. Newman Version (can be found via newman -v): 4.5.4
  2. OS details (type, version, and architecture): Windows 10
  3. Are you using Newman as a library, or via the CLI? Issue affects both
  4. Did you encounter this recently, or has this bug always been there: Not sure (started using newman recently)
  5. Expected behaviour: NA - feature request
  6. Command / script used to run Newman: NA
  7. Sample collection, and auxiliary files (minus the sensitive details): BA
  8. Screenshots (if applicable): NA

Currently I can see no way of accessing the iteration data (data from the csv file) after the completion of the execution.

It will be useful to get access to this so that we can use this data in the reports . It is reasonable to expect to report/log the data values used for a specific test run/iteration.

It will be nice to be able to access this via the summary object like this : summary.iterationData[iterationNumber].variableName

Is there any way to get to this data from the summary object as of now?

sup-engineer avatar Aug 27 '19 17:08 sup-engineer

I am going ahead with a PR for this. Kindly review it.

adityaofficial10 avatar Feb 23 '21 20:02 adityaofficial10

I'm afraid that this feature has huge implications on the memory consumption of reporters.

The summary object is the biggest culprit for all memory related outages on large collections.

If a reporter needs iteration data, one approach is to simply forward the data source (filename) and the reporter can choose to implement what's applicable.

shamasis avatar Mar 17 '21 18:03 shamasis