Reputation: 13
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?
Upvotes: 0
Views: 1883
Reputation: 13
Vlad's tip above gave me my correct direction, the XML Report Processing was a dead end regarding my question/search.
My conclusion: Since I am only interested in the Fitnessetest, i.e. JUnit test results, I try to avoid going for the full site documentation, but have probably not tuned everything ideally. But here it goes:
In my TeamCity buildstep Maven I made sure: - Maven Parameters are now "clean site surefire-report:report" - Artifact Paths is now: "target\site\surefire-report.html"
In Project Settings, Report Tabs, I added a new Build Report Tab: - Tab Title "FitnesseTest", Start Page: "surefire-report.html" (this file may be seen in the build artifact link after a successful build.)
I also made sure my pom.xml file was up to date regarding the reporting section. I.e. Reporting Plugins included up to date plugins: - maven-surefire-plugin - maven-surefire-report-plugin - maven-site-plugin - maven-jxr-plugin (not sure if I needed this one)
When I run this build, I get both listing of all tests under the Test tab, but also the html page with the JUnit Testresults under the new "FitnesseTest" tab.
Now I am only missing the Fitnesse formattet output...
Upvotes: 0
Reputation: 703
'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.
Upvotes: 1