Всем привет! Никак не получается прикрутить Allure к проекту на Java, Cucumber и JUnit. Пока что запускаю локально, никакого Jenkins. Но вот что происходит.
-
Запускаю mvn clean test => все тесты прошли BUILD SUCCESS
-
Запускаю команду mvn site, и вот тут-то возникает в логах такая надпись:
[WARNING] Results directory for module b2b-web-test not found.
[WARNING] Allure report was skipped because there is no results directories found.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
Ну, то есть, не создаётся папочка со всеми результатами. Как бы я ни бился с этой проблемой - ничего не получается. Может, вы поможете, дорогие друзья? Думаю, что-то я упустил в pom, но что. Посему, вот содержание pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>m2m-selenium</groupId>
<artifactId>b2b-web-test</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.version>1.8.10</aspectj.version>
<allure.version>1.4.23</allure.version>
<serverAddress>http://m2m-b2b/b2b/</serverAddress>
<username>admin</username>
<password>admin</password>
<browser>chrome</browser>
<timeout>500</timeout>
<!--Selenium driver: remote or local-->
<seleniumDriver>local</seleniumDriver>
</properties>
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>pl.pragmatists</groupId>
<artifactId>JUnitParams</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.7</version>
</dependency>
<!-- https://mvnrepository.com/artifact/ru.yandex.qatools.allure/allure-junit-adaptor -->
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-junit-adaptor</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<!--NEW-->
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-cucumber-jvm-adaptor</artifactId>
<version>1.6.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<printSummary>true</printSummary>
<testFailureIgnore>false</testFailureIgnore>
<argLine>
-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
-Dcucumber.options=" --plugin ru.yandex.qatools.allure.cucumberjvm.AllureReporter"
</argLine>
<forkMode>never</forkMode>
<!-- <reuseForks>false</reuseForks>-->
<testFailureIgnore>true</testFailureIgnore>
<systemPropertyVariables>
<serverAddress>${serverAddress}</serverAddress>
<username>${username}</username>
<password>${password}</password>
<buildDirectory>${project.build.directory}</buildDirectory>
<browser>${browser}</browser>
<timeout>${timeout}</timeout>
<seleniumDriver>${seleniumDriver}</seleniumDriver>
</systemPropertyVariables>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<!--Needed only to show reports locally. Run jetty:run and
open localhost:8080 to show the report-->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.10.v20150310</version>
<configuration>
<webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
<stopKey>stop</stopKey>
<stopPort>1234</stopPort>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<configuration>
<resultsDirectory>allure-results</resultsDirectory>
</configuration>
<version>2.5</version>
</plugin>
</plugins>
</reporting>
</project>