Grails with Team City
On my Grails project, I wish to use Team City for the build management. I've read severa开发者_运维问答l blogs/documentation on how to get the builds with Team City, but I see that when you run regular Java unit tests, Team City is smart enough to give you a nice output saying tests passed and test failed.
When I run my Grails tests, either from ANT or using the command-line option, I only see a success or failure output. This is probably because both are running test-app under the covers. Is there anyway to see the test passed/failed in Team City? How does Team City know what tests passed/failed from ANT Java unit tests?
These are the sources where I found out how to get Grails running with Team City. http://groovy.dzone.com/news/automate-grails-app-builds-tea http://groovy.dzone.com/news/automate-grails-app-tests-team
Nice thing is that Grails spits out XML, text or HTML test results which can be found in .../target/test-reports
directory.
To integrate the reports into TeamCity, you'd go to your build configuration's General Settings and add an artefact path. i.e. target/test-reports/html
(path may vary) which would upload all HTML reports to the server.
To view it, go to the build results page and click on Artifacts drop-down.
I've written a Grails plugin which hooks into TeamCity via the Service Message API to provide better integration:
http://grails.org/plugin/teamcity
精彩评论