Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a existing way to generate surefire reports with simple-build-tool?

I'm working on a project using Scala running Selenium tests as part of a continuous integration process. Hudson displays very helpful information based on the results in the surefire reports but I would much prefer using sbt to Maven. Is there an existing way to get sbt to generate surefire reports from sbt tests?

like image 313
Bryan J Swift Avatar asked Nov 05 '22 14:11

Bryan J Swift


1 Answers

There are three approaches to achieve this. I think the first would be a great contribution to make to SBT!

Write a TestsListener for SBT to generate Surefire XML reports

There is currently no unified reporting, as per the Maven surefire plugin. It would be possible to add this to SBT with a custom TestsListener.

Pass arguments to the test framework to trigger XML generation

I don't think Specs or ScalaTest support the Surefire XML format directly. It was recently requested for ScalaTest.

Use a JUnit adapter for your tests, and use the JUnitRunner

ScalaTest and Specs provide traits you can mix in to your tests so they are compatible with JUnit. JUnit support in SBT is being re-integrated right now, but I don't know if it will support this.

Specs itself uses the Maven + Surefire for it's Hudson build.

like image 161
retronym Avatar answered Dec 20 '22 00:12

retronym