allure-scalatest

Scalatest adapter for Allure framework.

License

License

Categories

Categories

Scala Languages Dex General Purpose Libraries Utility
GroupId

GroupId

ru.yandex.qatools.allure
ArtifactId

ArtifactId

allure-scalatest_2.11
Last Version

Last Version

1.5.1
Release Date

Release Date

Type

Type

jar
Description

Description

allure-scalatest
Scalatest adapter for Allure framework.
Project URL

Project URL

https://github.com/allure-framework/allure-scalatest
Project Organization

Project Organization

Yandex LLC
Source Code Management

Source Code Management

https://github.com/allure-framework/allure-scalatest

Download allure-scalatest_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/ru.yandex.qatools.allure/allure-scalatest_2.11/ -->
<dependency>
    <groupId>ru.yandex.qatools.allure</groupId>
    <artifactId>allure-scalatest_2.11</artifactId>
    <version>1.5.1</version>
</dependency>
// https://jarcasting.com/artifacts/ru.yandex.qatools.allure/allure-scalatest_2.11/
implementation 'ru.yandex.qatools.allure:allure-scalatest_2.11:1.5.1'
// https://jarcasting.com/artifacts/ru.yandex.qatools.allure/allure-scalatest_2.11/
implementation ("ru.yandex.qatools.allure:allure-scalatest_2.11:1.5.1")
'ru.yandex.qatools.allure:allure-scalatest_2.11:jar:1.5.1'
<dependency org="ru.yandex.qatools.allure" name="allure-scalatest_2.11" rev="1.5.1">
  <artifact name="allure-scalatest_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='ru.yandex.qatools.allure', module='allure-scalatest_2.11', version='1.5.1')
)
libraryDependencies += "ru.yandex.qatools.allure" % "allure-scalatest_2.11" % "1.5.1"
[ru.yandex.qatools.allure/allure-scalatest_2.11 "1.5.1"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.8
org.scalatest : scalatest_2.11 jar 2.2.6
ru.yandex.qatools.allure : allure-java-aspects jar 1.4.23

test (1)

Group / Artifact Type Version
org.mockito : mockito-core jar 2.4.2

Project Modules

There are no modules declared in this project.

[DEPRICATED]

Please follow https://github.com/allure-framework/allure-java

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: https://github.com/allure-framework/allure-scalatest-example

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 += "ru.yandex.qatools.allure" % "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", "ru.yandex.qatools.allure.scalatest.AllureReporter")
)

When using this adapter you can encounter the following warning:

[ScalaTest-dispatcher] WARN ru.yandex.qatools.allure.utils.AllureResultsUtils - 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: ru.yandex.qatools.allure.utils.BadXmlCharacterEscapeHandler@5e652b7b
	at javax.xml.bind.helpers.AbstractMarshallerImpl.setProperty(AbstractMarshallerImpl.java:358)
	at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.setProperty(MarshallerImpl.java:527)
	at ru.yandex.qatools.allure.utils.AllureResultsUtils.setPropertySafely(AllureResultsUtils.java:199)
	at ru.yandex.qatools.allure.utils.AllureResultsUtils.marshaller(AllureResultsUtils.java:171)
	at ru.yandex.qatools.allure.utils.AllureResultsUtils.writeTestSuiteResult(AllureResultsUtils.java:148)
	at ru.yandex.qatools.allure.Allure.fire(Allure.java:180)
	at ru.yandex.qatools.allure.scalatest.AllureReporter.testSuiteFinished(AllureReporter.scala:74)
	at ru.yandex.qatools.allure.scalatest.AllureReporter.apply(AllureReporter.scala:46)
	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$Propagator.run(DispatchReporter.scala:239)
	at java.lang.Thread.run(Thread.java:744)

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",
                           "oss.sonatype.org",
                           "login",
                           "password")

To publish simply run:

$ sbt publish-signed
ru.yandex.qatools.allure

Allure Framework

A flexible lightweight multi-language test report tool

Versions

Version
1.5.1