XML Report Processing
Last modified: 20 April 2023XML Report Plugin allows to specify report files on disk that will be parsed during the build and the results reported as the build results.
XML Report Processing can be configured in the Web UI as a Adding Build Features or from within the build via Build Script Interaction with TeamCity.
XML Report Processing supports the following testing frameworks:
JUnit Ant task
Maven Surefire plugin
NUnit-Console XML reports
MSTest TRX reports (for MSTest 2005/2008/2010)
Google Test XML reports
and the following code inspection tools:
code inspections from FindBugs
PMD
Checkstyle
JSLint XML reports
and the following code duplicates tools:
PMD Copy/Paste Detector XML reports
XML Report Processing plugin monitors the specified report paths and when the matching files are detected, they are parsed according to the report type specified. The results are then sent to TeamCity. When possible, parsing of partially written files is supported, so the reporting is started as soon as first data is available and more data is reported as it is written to the report files.
The plugin takes into account only the files updated since the build start (determined by means of the last modification file timestamp).
Configuring XML Report Processing
XML Report Processing Build Feature
Add XML Report Processing as a build feature on the Build Steps page and configure its settings:
Choose report type and specify monitoring rules in the form of
+|-:path
separating them by comma or new line. Paths without+|:
prefix are treated as including. Ant-style wildcards likedir/**.xml
(this means all files with extension .xml under directory "dir") are supported here.note
TeamCity loads generated reports once when they are created, make sure your build procedure generates files with unique names for each tests set without report files overwriting.
Check Verbose output option to enable detailed logging to build log.
For FindBugs report processing it is necessary to specify path to FindBugs installation on agent. It will be used for retrieving actual bug patterns, categories and their messages.
For FindBugs, PMD and Checkstyle code inspections reports processing you can specify maximum errors and warnings limits, exceeding which will cause the build failure. Leave these fields blank, if there are no limits.
Service Messages Support
Alternatively, you can send a Build Script Interaction with TeamCity ##teamcity[importData type='sometype' path='rules']
to initiate the plugin monitor rules specified by rules
attribute. Build Script Interaction with TeamCity.
Development Links
The plugin is open source and is available as: Sources in JetBrains Subversion repository. Builds at JetBrains public TeamCity instance.
See also:
Concepts: Build Runner | Testing Frameworks
Thanks for your feedback!