Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Sometimes CLI reporter outputs 'NaNms' #376

Closed
honzajavorek opened this issue Feb 22, 2016 · 6 comments
Closed

Sometimes CLI reporter outputs 'NaNms' #376

honzajavorek opened this issue Feb 22, 2016 · 6 comments
Labels
bug Epic: CLI reporter Dredd's default reporter

Comments

@honzajavorek
Copy link
Contributor

pass: GET /message duration: NaNms

@romansklenar
Copy link

+1 for that. I get that every time when test case passes but when it fails it shows actual time in miliseconds (using python hooks).

@akondas
Copy link

akondas commented Mar 14, 2016

+1, the same problem, every test case: duration: NaNms but when fails time is correct number.

dredd --version
dredd v1.0.7

Hooks: PHP

@jakubkratina
Copy link

Same in dredd v1.0.11

@honzajavorek
Copy link
Contributor Author

honzajavorek commented May 24, 2016

Yes, this is still an issue. I haven't got to fix it due to working heavily on #388 and #389 these days. I think the fix wouldn't be difficult. It's probably somewhere in the CLI reporter. I guess there's some formula to calculate seconds and one of the variables comes as undefined in some cases:

$ coffee
coffee> undefined + 1
NaN
coffee> null + 1
1
coffee> 0 + 1
1

Also, if fixed there, it would be nice to look into the other reporters if there's not a similar bug. Would anyone of you like to work on this?

@jakubkratina
Copy link

I'll take a look, but no promises with solving it :)

@honzajavorek
Copy link
Contributor Author

Released as v3.5.1 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Epic: CLI reporter Dredd's default reporter
Projects
None yet
Development

No branches or pull requests

4 participants