Dredd: Sometimes CLI reporter outputs 'NaNms'

Created on 22 Feb 2016  路  6Comments  路  Source: apiaryio/dredd

pass: GET /message duration: NaNms

CLI reporter bug

Most helpful comment

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

All 6 comments

+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).

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

dredd --version
dredd v1.0.7

Hooks: PHP

Same in dredd v1.0.11

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?

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

Released as v3.5.1 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tishibas picture tishibas  路  3Comments

rkchilaka picture rkchilaka  路  3Comments

colinrymer picture colinrymer  路  6Comments

honzajavorek picture honzajavorek  路  4Comments

alejandropg picture alejandropg  路  6Comments