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?