How would I produce JUnit test report for groovy tests, suitable for consumption by Jenkins/Hudson?

后端 未结 4 1233
误落风尘
误落风尘 2021-02-06 05:05

I\'ve written several XMLUnit tests (that fit in to the JUnit framework) in groovy and can execute them easily on the command line as per the groovy doco but I don\'t quite unde

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-06 05:58

    Since you're asking for the purposes of exposing the report to Jenkins/Hudson, I'm assuming you have a Maven/Ant/etc build that you're able to run. If that's true, the solution is simple.

    First of all, there's practically no difference between Groovy and Java JUnit tests. So, all you need to do is add the Ant/Maven junit task/plugin to your build and have it execute your Groovy junit tests (just as you'd do if they were written in Java). That execution will create test reports. From there, you can simply configure your Hudson/Jenkins build to look at the directory where the test reports get created during the build process.

提交回复
热议问题