allure-framework / allure-scalatest

Allure adapter for ScalaTest framework


Allure ScalaTest Adapter

This adapter allows to retrieve test execution data from ScalaTest framework and convert it to the form suitable for Allure report generation.

Example project

Example project is located at:

Installation, Configuration and Usage

In order to use this adapter you need to have JDK 1.7+ installed. To enabled adapter simply add the following dependency to build.sbt:

libraryDependencies += "" % "allure-scalatest_2.10" % "1.4.0-SNAPSHOT"

Then attach AllureReporter in build.sbt:

testOptions in Test ++= Seq(
    Tests.Argument(TestFrameworks.ScalaTest, "-oD"),
    Tests.Argument(TestFrameworks.ScalaTest, "-C", "")

When using this adapter you can encounter the following warning:

[ScalaTest-dispatcher] WARN - Can't set "com.sun.xml.bind.marshaller.CharacterEscapeHandler" property to given marshaller
javax.xml.bind.PropertyException: name: com.sun.xml.bind.marshaller.CharacterEscapeHandler value:
	at javax.xml.bind.helpers.AbstractMarshallerImpl.setProperty(
	at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.setProperty(
	at org.scalatest.DispatchReporter$Propagator$$anonfun$run$1.apply(DispatchReporter.scala:240)
	at org.scalatest.DispatchReporter$Propagator$$anonfun$run$1.apply(DispatchReporter.scala:239)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at org.scalatest.DispatchReporter$

This is related to incompatible JAXB versions used in Allure and Scalatest so you can safely ignore it.

How to generate report

This adapter only generates XML files containing information about tests. See wiki section on how to generate report.

Publishing to Sonatype (adapter development)

A publicly available (on public keyserver) GPG key should be present in you default GPG keyring. You need to create sonatype.sbt file in ~/.sbt//:

credentials += Credentials("Sonatype Nexus Repository Manager",

To publish simply run:

$ sbt publish-signed