Allure gradle integration

7k views Asked by At

I'm trying to integrate Allure reports into a Gradle build. It seems there is no direct support for Gradle overall (all Maven) and only some recent support for TestNG. Digging further I see a number of issues with Gradle not supporting JUnit listeners, but they do support TestNG listeners (because TestNG does). I've tried a gradle integration following the Maven pom as guideline for the JUnit plugin, but it obviously produces no output. So I guess my question is : Will there be any gradle support coming soon or will we have to wait for Gradle to enable some sort of JUNit listener facility first? If none of the above, has anyone done a custom integration ?

1

There are 1 answers

0
Dmitry Baev On

Allure TestNG Gradle example here https://github.com/allure-examples/allure-gradle-testng-example

It's works because TestNG supports Java SPI for adding test listeners. But JUnit does't have such feature. You can check out the following PR to JUnit https://github.com/junit-team/junit/pull/923

If you need Gradle support for JUnit right now you can try to implement Gradle Test Listener (http://www.gradle.org/docs/current/javadoc/org/gradle/api/tasks/testing/TestListener.html)

Hope it helps