The XML Report processing build feature allows using report files produced by an external tool in TeamCity. TeamCity will parse the specified files on the disk and report the results as the build results.
The report parsing can also be initiated from within the build via service messages.
XML Report Processing supports the following testing frameworks:
- JUnit Ant task
- Maven Surefire/Failsafe plugin
- NUnit-Console XML reports
- TRX reports (for MSTest 2005-2015 and VSTest 2012-2015. Since TeamCity 10.0.4 - version 2017 of both engines is supported.)
- Google Test XML reports
- XML output from CTest
and the following code inspection tools:
- FindBugs (code inspections only): only FindBugs native format is supported (see corresponding xsd). The XML report generated by the FindBugs Maven Plugin is NOT supported: it has completely different schema layout and elements.
- JSLint XML reports
and the following code duplicates tools:
- PMD Copy/Paste Detector XML reports
The bundled 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. For some report types, parsing of partially saved files is supported, so reporting is started as soon as first data is available and more data is reported as it is written on the disk.
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
Add XML Report Processing as a build feature and configure its settings:
Choose the report type and specify monitoring rules in the form of
+|-:pathseparating them by a comma or new line.
Paths without the
+|:prefix are treated as including. Ant-style wildcards are supported, e.g.
dir/**.xmlmeans all files with the .xml extension under the "dir" directory).
- Check the Verbose output option to enable detailed logging to the build log.
- For FindBugs report processing, it is necessary to specify the path to the FindBugs installation on the 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 a build failure. Leave these fields blank if there are no limits.
See plugin page at XML Test Reporting.