d10xa / gradle-allure-plugin

Gradle plugin generating Allure report from test results
Apache License 2.0
23 stars 2 forks source link

Produce duplicate test results with spring boot #9

Closed akoval closed 7 years ago

akoval commented 7 years ago

I have a spring-boot as core framework. I have unit tests using spring stuff for unit tests

@RunWith(SpringRunner.class)

In allure results instead of 10 tests I have 20 (10 is real value). And I see duplicates in report as well.

Probably problem with allure-junit-aspectj-adaptor dependency. It contains aspect to catch run() call and adds AllureRunListener to count tests for report.

Maybe with SpringRunner it executes twice so that is why I have duplications. It would be great to have option to disable this dependency (if it is root of the problem). So I can use any framework and can decide what approach to use (aspect handler or old-school BaseTest wrapper with Allure Listener inside)

d10xa commented 7 years ago

@akoval Need to upgrade to version 0.5.5

build.gradle example https://github.com/d10xa/gradle-allure-plugin-examples/blob/master/junit-spring/build.gradle