postmanlabs / newman

Newman is a command-line collection runner for Postman
https://www.postman.com
Apache License 2.0
6.88k stars 1.16k forks source link

Default HTML report template multiplies folder and request IDs #1527

Closed bartmanus closed 6 years ago

bartmanus commented 6 years ago

Problem description

Default HTML report template at newman/lib/reporters/html/template-default.hbs reuses folder and request IDs between iterations:

Environment

  1. Newman Version: 3.9.3
  2. OS details (type, version, and architecture): Centos 7 x86_64 container host, newman Docker image (postman/newman_alpine33:latest ID=sha256:3ced17a46f83d133f16c613414b0fbd0a713fb9ea8a39f61824611f238bd842e)
  3. Are you using Newman as a library, or via the CLI? CLI
  4. Did you encounter this recently, or has this bug always been there: noticed yesterday
  5. Expected behaviour: the folder or request from the current iteration should collapse
  6. Command / script used to run Newman: newman run postman_collection.json --iteration-count 3 --suppress-exit-code --reporters html,junit
  7. Sample collection, and auxiliary files (minus the sensitive details):

Proposed solution

Append iteration index from the {{#each aggregations}} block into mentioned IDs:

I will create a fork with these fixes jand submit a pull request.

kunagpal commented 6 years ago

@bartmanus A quick update: This is by design, as the HTML reporter is meant to display aggregated request results. The original P.R was merged in haste, I've issued a revert in #1552

kunagpal commented 6 years ago

@bartmanus This has been fixed in Newman v3.10.0 😄