Daily Usage Issues

NCrunch test duration not reporting correctly to TeamCity

Started by Grendil on 4,694 views

I believe this is a bug report:

NCrunch console, when TeamCity is detected, outputs TestFinished messages that TeamCity picks up for test reporting. (Great feature!) These include a Duration attribute which is needed because otherwise TeamCity reports durations incorrectly under NCrunch's parallel execution. (NCrunch writes the full test report at once after the test finishes, so the durations end up being reported as near zero if TeamCity is left to implicitly derive them.)

The bug?: NCruch console is writing these duration values as decimals, while they need to be ints in order to be used by TeamCity.

From this TeamCity doc page:

duration (optional numeric attribute) - sets the test duration in milliseconds (should be an integer) to be reported in TeamCity UI.

I've got a post processing wrapper on the console that is converting these to integers before writing the message to TeamCity, and when I do that I can confirm that TeamCity reports the duration correctly.

We're using TeamCity 2017.1.4
Thanks for sharing this problem. The TeamCity integration is way out of date and is due for an overhaul. I've made a note of this issue to get it addressed with the rest of the integration.

Post a reply

Log in to reply.