Пытаюсь прикрутить отчеты Allure к тестам JUnit проекта на Maven. Когда тест провален (failure), отчет не генерится, вываливается следующее:
"D:\Program Files\Java\jdk1.8.0_77\bin\java" -Dmaven.multiModuleProjectDirectory=D:\Users\Stas\IdeaProjects\SBT_Task "-Dmaven.home=D:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.1.1\plugins\maven\lib\apache-maven-3.3.9" "-Dclassworlds.conf=D:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.1.1\plugins\maven\lib\apache-maven-3.3.9\bin\m2.conf" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=D:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.1.1\bin" -Dfile.encoding=UTF-8 -classpath "D:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.1.1\plugins\maven\lib\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar;D:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.1.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.1.1
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SBT_Task 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ SBT_Task ---
[INFO] Deleting D:\Users\Stas\IdeaProjects\SBT_Task\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SBT_Task ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Users\Stas\IdeaProjects\SBT_Task\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ SBT_Task ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to D:\Users\Stas\IdeaProjects\SBT_Task\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SBT_Task ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Users\Stas\IdeaProjects\SBT_Task\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ SBT_Task ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to D:\Users\Stas\IdeaProjects\SBT_Task\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.14:test (default-test) @ SBT_Task ---
[INFO] Surefire report directory: D:\Users\Stas\IdeaProjects\SBT_Task\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Running A.AppTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.508 sec <<< FAILURE!
testApp(A.AppTest) Time elapsed: 0.353 sec <<< FAILURE!
junit.framework.AssertionFailedError: null
at junit.framework.Assert.fail(Assert.java:55)
at junit.framework.Assert.assertTrue(Assert.java:22)
at junit.framework.Assert.assertTrue(Assert.java:31)
at junit.framework.TestCase.assertTrue(TestCase.java:201)
at A.AppTest.testApp(AppTest.java:36)
Results :
Failed tests:
AppTest.testApp:36 null
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.764 s
[INFO] Finished at: 2016-04-03T10:27:39+06:00
[INFO] Final Memory: 16M/181M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14:test (default-test) on project SBT_Task: There are test failures.
[ERROR]
[ERROR] Please refer to D:\Users\Stas\IdeaProjects\SBT_Task\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Process finished with exit code 1
Вот мой POM:
4.0.0
<groupId>A</groupId>
<artifactId>B</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SBT_Task</name>
<url>http://maven.apache.org</url>
<properties>
<allure-junit-adaptor.version>1.4.23</allure-junit-adaptor.version>
<aspectj.version>1.7.4</aspectj.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>
<build>
<defaultGoal>clean test site</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14</version>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<argLine>
-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
</argLine>
<properties>
<property>
<name>listener</name>
<value>ru.yandex.qatools.allure.junit.AllureRunListener</value>
</property>
</properties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-junit-adaptor</artifactId>
<version>${allure-junit-adaptor.version}</version>
</dependency>
</dependencies>
</project>
Как сделать, чтобы отчет Allure генерировался даже при непрохождении теста?
Очень надеюсь на вашу помощь…