NUnit XML Test Reporting plugin - Show parameterized TestFixture values and/or Test case properties

Hello!

I'm new to TeamCity (and automated build environments in general) and I was hoping to find some options for the XML Test Reporting plugin. Unfortunately, I have not found these options so I'm wondering if they could be added as features to the plugin. Currently, I'm generating NUnit XML files in NUnit 2.6 format that I read using the XML Test Reporting plugin. However, my tests have parameterized TestFixtures and the values used for the TestFixtures are not visible on the Tests tab of the Build page in TeamCity. I'm assuming the plugin populates the values shown for the tests on this page.

To try to circumvent this issue, I've also tried adding additional NUnit properties to the Tests themselves to see if the XML Test Reporting plugin would show the values of these properties. Unfortunately, it does not seem to do that. It only shows the value of the stack-trace node in the NUnit XML results.

I really need some way to show the values of the parameterized TestFixtures or show the custom Properties that are written to the NUnit results XML in the TeamCity Tests tab of the build. Otherwise, I always have to read the XML manually from my build artifacts. Thanks!

2 comments
Comment actions Permalink

Michael,

Actually, there is no dedicated support for test parameters in TeamCity core, so if one need to see the parameters, they can be just embedded into the test name.
e.g. just report "testName('param')" test.

BTW, you might consider to use service messages for your integration instead of generating XML report.

As to support for additinal atributes from NUnit XML report and that is a standard report feature, you are welcome to file an issue into our issues tracker and attach report example and detailed description of the expected and actual results.

0
Comment actions Permalink

Thanks for the information. I did end up finding a workaround, similar to what you stated.

Since my TestFixtures were parameterized, I had to instead have the tests themselves take in what the TestFixtures were taking in before as parameters. This caused a problem where I couldn't construct the TestFixture class since I no longer had the parameter available in the Setup method. To get around this, I used the current TestContext and got the currently executing test name. From this name, I wrote a parser to get the string version of the individual parameter I needed, and then convert it to the type of object it actually is. Unfortunately, now the test developers are required to have that parameter passed into every Test, and specify the values for that parameter per test. It may prove it clear up a few issues we had with the parameterized TestFixture approach, though.

For now, I need to generate an XML report because it is the only test output that is possible, since I'm using NUnitLite, and not NUnit. I have a special patch build currently that has a feature to choose XML report format (between 2.6 and 3.0), in which TeamCity only recognizes NUnit 2.6 format. I may add an issue into your issue tracker, time permitting.

Thanks again!

0

Please sign in to leave a comment.