The DUnit Integration with TeamCity is great. This post taking it further to get most out of TeamCity.
We know that when a build fails, we can always visit the build log and will get to know what went wrong. This is sufficient for a developer or a build engineer to investigate and fix the issue.
However as a developer, I would be more happy if it can tell me exactly what tests are failed. Logs are OK but those are verbose; and personally, I would reserve it to be the last option. So what's the other option?
TeamCity is our friend. What about letting it know more about our test results? Let's see
This is exactly what we need. Moreover, now we have a new Tests tab showing nice test report with filtering, sorting and export options.
Of course, there is more than what's shown here; and I would leave the reader to discover those fascinating offerings of TeamCity. For now lets focus on how to get there.
TeamCity provides various options to enhance the experience with the build system. Such as service messages, plugins, build features etc. Among these, the easiest one is XML report processing which takes almost same amount of time as it takes to read this post.
Before we enable this feature, we need to tweak the DUnit a little bit to produce an XML report TeamCity understands. The solution is VSoft's XMLRunner for DUnit. It produces an XML report in NUnit format. The source code is available under Apache license with example.
All we need to do now is to enable the build feature. Select the project > Edit Configuration Settings > Select Build Features option.
Click the Add build feature button and choose XML report processing. Report type being NUnit and set monitoring rules.
Click Save and you're done! We have a full fledged DUnit integration.
We know that when a build fails, we can always visit the build log and will get to know what went wrong. This is sufficient for a developer or a build engineer to investigate and fix the issue.
However as a developer, I would be more happy if it can tell me exactly what tests are failed. Logs are OK but those are verbose; and personally, I would reserve it to be the last option. So what's the other option?
TeamCity is our friend. What about letting it know more about our test results? Let's see
This is exactly what we need. Moreover, now we have a new Tests tab showing nice test report with filtering, sorting and export options.
Of course, there is more than what's shown here; and I would leave the reader to discover those fascinating offerings of TeamCity. For now lets focus on how to get there.
TeamCity provides various options to enhance the experience with the build system. Such as service messages, plugins, build features etc. Among these, the easiest one is XML report processing which takes almost same amount of time as it takes to read this post.
Before we enable this feature, we need to tweak the DUnit a little bit to produce an XML report TeamCity understands. The solution is VSoft's XMLRunner for DUnit. It produces an XML report in NUnit format. The source code is available under Apache license with example.
All we need to do now is to enable the build feature. Select the project > Edit Configuration Settings > Select Build Features option.
Click the Add build feature button and choose XML report processing. Report type being NUnit and set monitoring rules.
Click Save and you're done! We have a full fledged DUnit integration.
No comments:
Post a Comment