JUnitXmlTestsListener

sbt.JUnitXmlTestsListener
class JUnitXmlTestsListener(val targetDir: File, legacyTestReport: Boolean, logger: Logger) extends TestsListener

A tests listener that outputs the results it receives in junit xml report format.

Value parameters

targetDir

directory in which test reports are generated

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

class TestSuite(val name: String, timestamp: LocalDateTime)

Gathers data for one Test Suite. We map test groups to TestSuites. Each TestSuite gets its own output file.

Gathers data for one Test Suite. We map test groups to TestSuites. Each TestSuite gets its own output file.

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Constructors

def this(outputDir: String, legacyTestReport: Boolean, logger: Logger)
def this(outputDir: String, logger: Logger)
def this(outputDir: String)

Concrete methods

override def contentLogger(test: TestDefinition): Option[ContentLogger]

Returns None

Returns None

Attributes

Definition Classes
override def doComplete(finalResult: TestResult): Unit

Does nothing, as we write each file after a suite is done.

Does nothing, as we write each file after a suite is done.

Attributes

Definition Classes
override def doInit(): Unit

Creates the output Dir

Creates the output Dir

Attributes

Definition Classes
override def endGroup(name: String, t: Throwable): Unit

called for each class or equivalent grouping We map one group to one Testsuite, so for each Group we create JUnit XML file, and looks like this:

called for each class or equivalent grouping We map one group to one Testsuite, so for each Group we create JUnit XML file, and looks like this:

tests="z" hostname="example.com" name="eu.henkelmann.bla.SomeTest" time="0.23" timestamp="2018-01-01T10:00:00"> ... ... stack ... ...stack...

Attributes

Definition Classes
override def endGroup(name: String, result: TestResult): Unit

Ends the current suite, wraps up the result and writes it to an XML file in the output folder that is named after the suite.

Ends the current suite, wraps up the result and writes it to an XML file in the output folder that is named after the suite.

Attributes

Definition Classes
override def startGroup(name: String): Unit

Starts a new, initially empty Suite with the given name.

Starts a new, initially empty Suite with the given name.

Attributes

Definition Classes
override def testEvent(event: TestEvent): Unit

Adds all details for the given even to the current suite.

Adds all details for the given even to the current suite.

Attributes

Definition Classes

Deprecated methods

def outputDir: String

Attributes

Deprecated
true

Concrete fields

val hostname: String

Current hostname so we know which machine executed the tests

Current hostname so we know which machine executed the tests

Attributes

val properties: Elem

all system properties as XML

all system properties as XML

Attributes

val targetDir: File