Skip to content

8dspaces/allure-java

 
 

Repository files navigation

Allure Java Integrations bintray-badge

The repository contains new versions of adaptors for JVM-based test frameworks.

All the artifacts are deployed to https://dl.bintray.com/qameta/maven.

TestNG

The new TestNG adaptors is pretty much ready. To use the adaptor you should add the following dependency:

<dependency>
   <groupId>io.qameta.allure</groupId>
   <artifactId>allure-testng</artifactId>
   <version>$LATEST_VERSION</version>
</dependency>

also you need to configure AspectJ weaver to support steps.

JUnit 4

The first draft of a new JUnit 4 adaptor is ready. To use the adaptor you should add the following dependency:

<dependency>
   <groupId>io.qameta.allure</groupId>
   <artifactId>allure-junit4</artifactId>
   <version>$LATEST_VERSION</version>
</dependency>

JUnit 5

To use JUnit 5 simply add the following dependency to your project:

<dependency>
   <groupId>io.qameta.allure</groupId>
   <artifactId>allure-junit5</artifactId>
   <version>$LATEST_VERSION</version>
</dependency>

Selenide

Listener for Selenide, that logging steps for Allure:

<dependency>
   <groupId>io.qameta.allure</groupId>
   <artifactId>allure-selenide</artifactId>
   <version>$LATEST_VERSION</version>
</dependency>

Usage example:

SelenideLogger.addListener("AllureSelenide", new AllureSelenide().screenshots(true).savePageSource(false));

Rest Assured

Filter for rest-assured http client, that generates attachment for allure.

<dependency>
   <groupId>io.qameta.allure</groupId>
   <artifactId>allure-rest-assured</artifactId>
   <version>$LATEST_VERSION</version>
</dependency>

Usage example:

.filter(new AllureRestAssured())

You can specify custom templateName:

.filter(new AllureRestAssured().withTemplate("/templates/custom_template.ftl"))

OkHttp

Interceptor for OkHttp client, that generates attachment for allure.

<dependency>
   <groupId>io.qameta.allure</groupId>
   <artifactId>allure-okhttp3</artifactId>
   <version>$LATEST_VERSION</version>
</dependency>

Usage example:

.addInterceptor(new AllureOkHttp3())

You can specify custom templates, which should be placed in src/main/resources/tpl folder:

.addInterceptor(new AllureOkHttp3()
                .withRequestTemplate("custom-http-request.ftl")
                .withResponseTemplate("custom-http-response.ftl"))

About

Allure integrations for java test frameworks

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 95.7%
  • Gherkin 2.1%
  • Groovy 1.9%
  • FreeMarker 0.3%