Using the play! framework (play2) - I am running tests via "play test".
This pretty prints the results - but I would also like the results to be put in the xunit "XML" format that all CI servers understand how to graphically report on.
Play 2.1.1 writes the test reports to target/test-reports.
For Java no further configuration is necessary, but for Scala adjust your project/Build.scala:
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "so-scala"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
// Add your project dependencies here,
jdbc,
anorm
)
val main = play.Project(appName, appVersion, appDependencies).settings(
//write test reports and to console
testOptions in Test += Tests.Argument("junitxml", "console")
)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With