postmanlabs / newman

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

Failed Requests account for average Time #3138

Open MaxiLambda opened 1 year ago

MaxiLambda commented 1 year ago
  1. Newman Version (can be found via newman -v): 5.3.2
  2. OS details (type, version, and architecture): Windows 11
  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: I have not encounterd this before, but i am an new user
  5. Expected behaviour: Failed Requests should be omitted from the calculation of the average request time
    1. Script newman run mycollection.postman_collection.json -n1000 --disable-unicode --color off

mycollection: contains some post and some get requests. All are send to different endpoints with basic authentication

  1. start sending requests to a server
  2. Have some of the requests fail
  3. Calcualte the average given to you by post man to the average you calculate yourself

let sum be the sum of the time of all not failed request let n be the amount of requests let err be the amount of failed requests

=> newman seems to calculate the average as sum/n => correct: sum/(n-err)