How can I get play framework (2.1) to export test results in xunit format

Using the game! framework (play2) - I run tests through the "play test".

This pretty prints the results - but I would also like the results to be placed in the xunit "XML" format, which all CI servers understand how to graphically communicate.

+8
jenkins xunit playframework sbt
source share
1 answer

Playback 2.1.1 records test reports in target / test reports.

No further configuration is required for Java, but for Scala, edit your /Build.scala project:

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") ) } 
+14
source share

All Articles