Search code examples
maventeamcitysurefire

How do I import surefire-reports to Teamcity 9 webconsole?


I use Teamcity 9 to trigger a Maven buildstedp. Maven is set up to run Fitnessetests in JUnit tests. From Maven, I use the surefire-reports maven plugin and see that Teamcity generate ./buildAgent/work/xxxxx/target/surefire-reports/TEST-Test.xml files. I also see that I have managed to to set up Teamcity with "XML Report Processing" to trigger generation of ./buildAgent/work/xxxxx/tmp/foo.html files.

But how do I get the html-files back to Teamcity web console? Is my Maven configuration of the surefire-reports plugin incomplete, i.e. expecting some formattet output in a dedicated Directory? Is there a missing step in Teamcity that would have fetched the generated html-files if added correctly?


Solution

  • 'XML Report Processing' is not generating any files, it just imports your test/duplicates results (in xml format) into TeamCity internal storage to show them on 'Tests'/'Duplicates' tabs of build.

    Also when you using Maven build step, surefire tests should be imported automatically, without 'XML Report Processing' build feature.

    If you want to present custom html file (e.g. report from some third-party tool), see ralated documetation.