Display correct number of tests in TeamCity

82 views
Skip to first unread message

Jamie Thomson

unread,
May 10, 2016, 3:45:23 AM5/10/16
to Pester
I have a suite of 31 Pester tests for a particular codebase. Those 31 tests (It{} blocks) are spread over 24 Context{} blocks which in turn are spread over 12 Describe{} blocks.
We are running these tests in a TeamCity CI build where we're using the XML Report processing build feature for NUnit to display our test results:
Annoyingly though when the tests run and results displayed TeamCity only reports (in this case) 19 tests and if we look at the test report we can see why, some of our tests (i.e. It {}blocks) have the same name and hence TeamCity *helpfully* groups them into one:
If we look at the NUnit XML report we can see why this is happening, the Context{} block doesn't appear in there anywhere:

We could of course simply rename the tests to make the test-case names unique but that removes the value of the Context{} blocks. In my head I'm envisaging a simple change would be to simply include the Context{} in the test-case name though I don't know how easy it would be to do that.

Thoughts?



Auto Generated Inline Image 1
Auto Generated Inline Image 2
Auto Generated Inline Image 3
Auto Generated Inline Image 4

Dave Wyatt

unread,
May 10, 2016, 6:37:05 AM5/10/16
to Pester
That's a known problem, will be fixed in v4.0.  (Any change to the NUnit XML is a breaking change, so it'll need to be a major release.)

Jamie Thomson

unread,
May 10, 2016, 10:19:34 AM5/10/16
to Pester
excellent news, thanks Dave.

When is v4 due? (No rush, just interested to know)
Reply all
Reply to author
Forward
0 new messages