Давайте тогда на шаг вперёд.
Удалите везде allure-results, таргет удалите.
После запуска и отработки теста, у вас создалась папка allure-results? Хоть где-нить?
Её содержимое какое? Как на моём скрине?
Сражаюсь с аналогичной проблемой. Папка allure-results создается в корне проекта. Приходится руками копировать в target для успешного создания отчета
Должно работать норм, если создать файлик allure.properties и прописать в нем allure.results.directory=target/allure-results
Спасибо, это действительно помогло
Сменил машину и систему - теперь Win10. Установил JAVA, IDEA, maven. Прописал все пути, всё проверяется через cmd. Перенес из старого проекта один тест и pom.xml. Тест проходит нормально.
Создал файл, полностью скопировав у Дмитрия название и его содержимое.
Далее пробовал по-разному, прятал в комментарии все ссылки на allure-result, “коментил” частями - теперь папки нет вообще.
Запускаю Allure следующим образом:
http://joxi.ru/V2VZ0ZJcxWOnW2
Имеет ли значение, что в файле allure.properties строка “allure.results.directory=” серого цвета, словно неактивна и/или нигде не задействована.
http://joxi.ru/xAeqZqwtpevO8A
Не помогло.
Результаты запуска команд в консоли:
mvn clean test
mvn allure:serve
mvn allure:report
D:\IdeaProjects\testov.net>mvn clean test
[INFO] Scanning for projects…
[INFO]
[INFO] -----------------------< testov.net:testov.net >------------------------
[INFO] Building testov.net 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ testov.net —
[INFO] Deleting D:\IdeaProjects\testov.net\target
[INFO]
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ testov.net —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ testov.net —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to D:\IdeaProjects\testov.net\target\classes
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ testov.net —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ testov.net —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to D:\IdeaProjects\testov.net\target\test-classes
[INFO]
[INFO] — maven-surefire-plugin:2.21.0:test (default-test) @ testov.net —
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.284 s
[INFO] Finished at: 2018-09-28T21:22:31+03:00
[INFO] ------------------------------------------------------------------------
D:\IdeaProjects\testov.net>mvn allure:serve
[INFO] Scanning for projects…
[INFO]
[INFO] -----------------------< testov.net:testov.net >------------------------
[INFO] Building testov.net 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] — allure-maven:2.9:serve (default-cli) @ testov.net —
[INFO] Allure installation directory D:\IdeaProjects\testov.net/.allure
[INFO] Try to finding out allure 2.3.1
[INFO] Generate Allure report (serve) with version 2.3.1
[INFO] Generate Allure report to D:\IdeaProjects\testov.net\target/allure-report
[ERROR] Directory D:\IdeaProjects\testov.net\target\allure-results not found.
[WARNING] Allure report was skipped because there is no results directories found.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.364 s
[INFO] Finished at: 2018-09-28T21:22:48+03:00
[INFO] ------------------------------------------------------------------------
D:\IdeaProjects\testov.net>mvn allure:report
[INFO] Scanning for projects…
[INFO]
[INFO] -----------------------< testov.net:testov.net >------------------------
[INFO] Building testov.net 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] — allure-maven:2.9:report (default-cli) @ testov.net —
[INFO] Allure installation directory D:\IdeaProjects\testov.net/.allure
[INFO] Try to finding out allure 2.3.1
[INFO] Generate Allure report (report) with version 2.3.1
[INFO] Generate Allure report to D:\IdeaProjects\testov.net\target/allure-report
[ERROR] Directory D:\IdeaProjects\testov.net\target\allure-results not found.
[WARNING] Allure report was skipped because there is no results directories found.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.338 s
[INFO] Finished at: 2018-09-28T21:23:16+03:00
[INFO] ------------------------------------------------------------------------
D:\IdeaProjects\testov.net>
UPD.
Еще раз создал проект. В настройках проекта точно указал на папку мавена Bundled maven
Написал простейший тест на открытие странички.
import com.codeborne.selenide.Configuration;
import io.qameta.allure.Step;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import static com.codeborne.selenide.Selenide.$;
import static com.codeborne.selenide.Selenide.open;
import static com.codeborne.selenide.WebDriverRunner.CHROME;
public class JavaTest {
@BeforeEach
public void testSettings(){
Configuration.browser = CHROME;
Configuration.headless = false;
}
@Test
@Step
@DisplayName(“Первый тест на новом помнике.”)
public void openMainPage(){
open(“http://vodvore.net/”);
$(“#sidebar p:nth-child(5) [class]”).click();
}
@Test
@Step
@DisplayName(“Второй тест на новом помнике.”)
public void openAnotherMainPage(){
open(“http://vodvore.net/”);
$(“#sidebar p:nth-child(5) [class]”).click();
}
}
Отчета нет.
Папка allure-results есть:, папки report нет.
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.689 s
[INFO] Finished at: 2018-09-29T20:41:28+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.qameta.allure:allure-maven:2.9:serve (default-cli) on project mavenTest: An error has occurred in Allure report generation.: Could not generate the report: Can’t generate allure report data: Process exited with an error: 1 (Exit value: 1) → [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] MojoExecutionException - Apache Maven - Apache Software Foundation
Process finished with exit code 1
Помник:
<?xml version="1.0" encoding="UTF-8"?>
4.0.0
<groupId>mavenTest</groupId>
<artifactId>mavenTest</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.version>1.8.10</aspectj.version>
</properties>
<dependencies>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit5</artifactId>
<version>2.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>4.12.3</version>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
</dependency>
<!-- нужен для того что бы все листнеры отработали-->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<configuration>
<properties>
<!--<includeTags>link</includeTags>-->
</properties>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<systemProperties>
<property>
<name>junit.jupiter.extensions.autodetection.enabled</name>
<value>true</value>
</property>
<property>
<name>allure.results.directory</name>
<value>${basedir}/target/allure-results</value>
</property>
</systemProperties>
</configuration>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.9</version>
<configuration>
<resultsDirectory>${basedir}/target/allure-results</resultsDirectory>
<reportDirectory>${basedir}/target/allure-reports</reportDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
Возможно, вы не поверите, но у меня всё хорошо с вашим примером отработало.
cd C:\.autotests\111111; "JAVA_HOME=C:\\Program Files (x86)\\Java\\jdk1.8.0_92" M2_HOME=C:\\.autotests\\.maven cmd /c "\"\"C:\\.autotests\\.maven\\bin\\mvn.cmd\" -Dmaven.ext.class.path=\"C:\\Program Files (x86)\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 --errors --errors clean install\""
Error stacktraces are turned on.
Scanning for projects...
------------------------------------------------------------------------
Building mavenTest 1.0-SNAPSHOT
------------------------------------------------------------------------
--- maven-clean-plugin:2.5:clean (default-clean) @ mavenTest ---
Deleting C:\.autotests\111111\target
--- maven-resources-plugin:2.6:resources (default-resources) @ mavenTest ---
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory C:\.autotests\111111\src\test\resources
--- maven-compiler-plugin:3.1:compile (default-compile) @ mavenTest ---
No sources to compile
--- maven-resources-plugin:2.6:testResources (default-testResources) @ mavenTest ---
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory C:\.autotests\111111\src\test\resources
--- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ mavenTest ---
Changes detected - recompiling the module!
Compiling 1 source file to C:\.autotests\111111\target\test-classes
--- maven-surefire-plugin:2.21.0:test (default-test) @ mavenTest ---
Surefire report directory: C:\.autotests\111111\target\surefire-reports
Using configured provider org.junit.platform.surefire.provider.JUnitPlatformProvider
file.encoding cannot be set as system property, use <argLine>-Dfile.encoding=...</argLine> instead
parallel='none', perCoreThreadCount=true, threadCount=0, useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, threadCountMethods=0, parallelOptimized=true
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running JavaTest
[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver
[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Latest version of chromedriver is 70.0.3538.16
[main] INFO io.github.bonigarcia.wdm.Downloader - Using binary driver previously downloaded
[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as C:\Users\user\.m2\repository\webdriver\chromedriver\win32\70.0.3538.16\chromedriver.exe
Starting ChromeDriver 70.0.3538.16 (16ed95b41bb05e565b11fb66ac33c660b721f778) on port 17580
Only local connections are allowed.
окт 01, 2018 10:55:13 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
окт 01, 2018 10:55:14 AM com.codeborne.selenide.webdriver.WebDriverFactory logBrowserVersion
INFO: BrowserName=chrome Version=69.0.3497.100 Platform=XP
окт 01, 2018 10:55:14 AM com.codeborne.selenide.webdriver.WebDriverFactory createWebDriver
INFO: Selenide v. 4.12.3
окт 01, 2018 10:55:14 AM com.codeborne.selenide.webdriver.WebDriverFactory logSeleniumInfo
INFO: Selenium WebDriver v. 3.13.0 build time: 2018-06-25T15:24:21.231Z
окт 01, 2018 10:55:14 AM com.codeborne.selenide.impl.WebDriverThreadLocalContainer createDriver
INFO: Create webdriver in current thread 1: ChromeDriver -> ChromeDriver: chrome on XP (9af5a43efac060d816bd2d6dbb60d042)
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.766 s - in JavaTest
Results:
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
--- maven-jar-plugin:2.4:jar (default-jar) @ mavenTest ---
JAR will be empty - no content was marked for inclusion!
Building jar: C:\.autotests\111111\target\mavenTest-1.0-SNAPSHOT.jar
--- maven-install-plugin:2.4:install (default-install) @ mavenTest ---
Installing C:\.autotests\111111\target\mavenTest-1.0-SNAPSHOT.jar to C:\.autotests\.maven\repo\mavenTest\mavenTest\1.0-SNAPSHOT\mavenTest-1.0-SNAPSHOT.jar
Installing C:\.autotests\111111\pom.xml to C:\.autotests\.maven\repo\mavenTest\mavenTest\1.0-SNAPSHOT\mavenTest-1.0-SNAPSHOT.pom
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 23.015 s
Finished at: 2018-10-01T10:55:23+03:00
Final Memory: 18M/43M
------------------------------------------------------------------------
И генерация самого отчета:
cd C:\.autotests\111111; "JAVA_HOME=C:\\Program Files (x86)\\Java\\jdk1.8.0_92" M2_HOME=C:\\.autotests\\.maven cmd /c "\"\"C:\\.autotests\\.maven\\bin\\mvn.cmd\" -Dmaven.ext.class.path=\"C:\\Program Files (x86)\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 --errors --errors io.qameta.allure:allure-maven:2.9:serve\""
Error stacktraces are turned on.
Scanning for projects...
------------------------------------------------------------------------
Building mavenTest 1.0-SNAPSHOT
------------------------------------------------------------------------
--- allure-maven:2.9:serve (default-cli) @ mavenTest ---
Allure installation directory C:\.autotests\111111/.allure
Try to finding out allure 2.0.1
Downloading allure commandline...
Proxy is not specified.
Downloading allure commandline complete
Generate Allure report (serve) with version 2.0.1
Generate Allure report to C:\.autotests\111111/target/allure-reports
Found results directory C:\.autotests\111111\target\allure-results
Can't find information about categories.
Generate report to C:\.autotests\111111\target\allure-reports
Generating report to temp directory...
Report successfully generated to C:\Users\user\AppData\Local\Temp\8827451853836656321\allure-report
Starting web server...
2018-10-01 10:57:58.394:INFO::main: Logging initialized @1891ms
Server started at <http://192.168.56.1:53462/>. Press <Ctrl+C> to exit
Спасибо за помощь.
Уже всю голову сломал, что не так. Не работает на двух машинах…
Кстати, а попробуйте 8 sdk java, может, проблема в 10?
Попробовал 8, 10. Результат тот же.
Снес все версии, кроме 11. Создал новый проект и скопипастил помник и тест. Проверил, что в настройках проекта указана версия jdk 11 и версия compiler 11. Проверил лишние пути в Path и прописал JAVA_HOME. Указал точное расположение папки в настройках Bandled Maven.
java version “11” 2018-09-25
Java™ SE Runtime Environment 18.9 (build 11+28)
Java HotSpot™ 64-Bit Server VM 18.9 (build 11+28, mixed mode)
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T21:33:14+03:00)
Maven home: C:\Maven\apache-maven-3.5.4\bin..
Java version: 11, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11
Default locale: ru_RU, platform encoding: Cp1251
OS name: “windows 10”, version: “10.0”, arch: “amd64”, family: “windows”
Результат все тот же:
[ERROR] Failed to execute goal io.qameta.allure:allure-maven:2.9:serve (default-cli) on project problema: An error has occurred in Allure report generation. Could not generate the report: Can’t generate allure report data: Process exited with an error: 1 (Exit value: 1) → [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] MojoExecutionException - Apache Maven - Apache Software Foundation
сколько тестов показывает ?
например если
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
то и кина не будет
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.574 s - in JavaTest
“C:\Program Files\Java\jdk-11\bin\java.exe” -Dmaven.multiModuleProjectDirectory=D:\IdeaProjects\problema -Dmaven.home=C:\Maven\apache-maven-3.5.4 -Dclassworlds.conf=C:\Maven\apache-maven-3.5.4\bin\m2.conf “-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.4\lib\idea_rt.jar=49475:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.4\bin” -Dfile.encoding=UTF-8 -classpath C:\Maven\apache-maven-3.5.4\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2018.2.4 clean test allure:serve
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------< mavenTest:mavenTest >-------------------------
[INFO] Building mavenTest 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ mavenTest —
[INFO] Deleting D:\IdeaProjects\problema\target
[INFO]
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ mavenTest —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ mavenTest —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ mavenTest —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ mavenTest —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to D:\IdeaProjects\problema\target\test-classes
[INFO]
[INFO] — maven-surefire-plugin:2.21.0:test (default-test) @ mavenTest —
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[DelegatingClassLoader@757529a4] error at io\qameta\allure\aspects\StepsAspects.java::0 the @annotation pointcut expression is only supported at Java 5 compliance level or above
[DelegatingClassLoader@757529a4] error at io\qameta\allure\aspects\AttachmentsAspects.java::0 the @annotation pointcut expression is only supported at Java 5 compliance level or above
[INFO] Running JavaTest
[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver
[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Latest version of chromedriver is 70.0.3538.16
[main] INFO io.github.bonigarcia.wdm.Downloader - Using binary driver previously downloaded
[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as C:\Users\Riccio.m2\repository\webdriver\chromedriver\win32\70.0.3538.16\chromedriver.exe
Starting ChromeDriver 70.0.3538.16 (16ed95b41bb05e565b11fb66ac33c660b721f778) on port 25214
Only local connections are allowed.
окт. 03, 2018 10:13:43 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
окт. 03, 2018 10:13:44 AM com.codeborne.selenide.webdriver.WebDriverFactory logBrowserVersion
INFO: BrowserName=chrome Version=69.0.3497.100 Platform=XP
окт. 03, 2018 10:13:44 AM com.codeborne.selenide.webdriver.WebDriverFactory createWebDriver
INFO: Selenide v. 4.12.3
окт. 03, 2018 10:13:44 AM com.codeborne.selenide.webdriver.WebDriverFactory logSeleniumInfo
INFO: Selenium WebDriver v. 3.13.0 build time: 2018-06-25T15:24:21.231Z
окт. 03, 2018 10:13:44 AM com.codeborne.selenide.impl.WebDriverThreadLocalContainer createDriver
INFO: Create webdriver in current thread 1: ChromeDriver → ChromeDriver: chrome on XP (02a030d681c3cefacf26e401b1f3269f)
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.302 s - in JavaTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] — allure-maven:2.9:serve (default-cli) @ mavenTest —
[INFO] Allure installation directory D:\IdeaProjects\problema/.allure
[INFO] Try to finding out allure 2.0.1
[INFO] Generate Allure report (serve) with version 2.0.1
[INFO] Generate Allure report to D:\IdeaProjects\problema/target/allure-reports
[INFO] Found results directory D:\IdeaProjects\problema\target\allure-results
[INFO] Can’t find information about categories.
[INFO] Generate report to D:\IdeaProjects\problema\target\allure-reports
Generating report to temp directory…
Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement
at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.(JaxbAnnotationIntrospector.java:139)
at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.(JaxbAnnotationIntrospector.java:126)
at io.qameta.allure.context.JacksonContext.(JacksonContext.java:24)
at io.qameta.allure.ConfigurationBuilder.useDefault(ConfigurationBuilder.java:50)
at io.qameta.allure.Commands.createReportConfiguration(Commands.java:158)
at io.qameta.allure.Commands.generate(Commands.java:63)
at io.qameta.allure.Commands.serve(Commands.java:88)
at io.qameta.allure.CommandLine.run(CommandLine.java:136)
at java.base/java.util.Optional.orElseGet(Optional.java:369)
at io.qameta.allure.CommandLine.main(CommandLine.java:72)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlElement
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
… 10 more
[ERROR] Can’t generate allure report data
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:153)
at io.qameta.allure.maven.AllureCommandline.execute (AllureCommandline.java:88)
at io.qameta.allure.maven.AllureCommandline.serve (AllureCommandline.java:73)
at io.qameta.allure.maven.AllureServeMojo.generateReport (AllureServeMojo.java:52)
at io.qameta.allure.maven.AllureGenerateMojo.executeReport (AllureGenerateMojo.java:137)
at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:255)
at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:143)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.799 s
[INFO] Finished at: 2018-10-03T10:13:58+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.qameta.allure:allure-maven:2.9:serve (default-cli) on project mavenTest: An error has occurred in Allure report generation.: Could not generate the report: Can’t generate allure report data: Process exited with an error: 1 (Exit value: 1) → [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] MojoExecutionException - Apache Maven - Apache Software Foundation
Process finished with exit code 1
Я слышал у алюра есть проблемы с jdk выше 8. Но это было несколько месяцев назад.
А у вас что установлено и какой версии? Какие настройки?
Попробуйте указать в секции билд, в плагинах
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<debug>false</debug>
</configuration>
</plugin>
Мне кажется, что ошибка в каких-то иных установках или настройках. Ведь у вас с этим помником прошел этот тест?
<?xml version="1.0" encoding="UTF-8"?>
4.0.0
<groupId>mavenTest</groupId>
<artifactId>mavenTest</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.version>1.8.10</aspectj.version>
</properties>
<dependencies>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit5</artifactId>
<version>2.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>4.12.3</version>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
</dependency>
<!-- нужен для того что бы все листнеры отработали-->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<debug>false</debug>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<configuration>
<properties>
<!--<includeTags>link</includeTags>-->
</properties>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<systemProperties>
<property>
<name>junit.jupiter.extensions.autodetection.enabled</name>
<value>true</value>
</property>
<property>
<name>allure.results.directory</name>
<value>${basedir}/target/allure-results</value>
</property>
</systemProperties>
</configuration>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.9</version>
<configuration>
<resultsDirectory>${basedir}/target/allure-results</resultsDirectory>
<reportDirectory>${basedir}/target/allure-reports</reportDirectory>
<!--<reportingOutputDirectory>${basedir}/target/allure-reportsssss</reportingOutputDirectory>-->
</configuration>
</plugin>
</plugins>
</build>
</project>
Отчет
“C:\Program Files\Java\jdk-11\bin\java.exe” -Dmaven.multiModuleProjectDirectory=D:\IdeaProjects\mavenTest -Dmaven.home=C:\Maven\apache-maven-3.5.4 -Dclassworlds.conf=C:\Maven\apache-maven-3.5.4\bin\m2.conf “-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.4\lib\idea_rt.jar=51112:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.4\bin” -Dfile.encoding=UTF-8 -classpath C:\Maven\apache-maven-3.5.4\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2018.2.4 clean test allure:serve
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------< mavenTest:mavenTest >-------------------------
[INFO] Building mavenTest 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ mavenTest —
[INFO] Deleting D:\IdeaProjects\mavenTest\target
[INFO]
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ mavenTest —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:3.8.0:compile (default-compile) @ mavenTest —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ mavenTest —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ mavenTest —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to D:\IdeaProjects\mavenTest\target\test-classes
[INFO]
[INFO] — maven-surefire-plugin:2.21.0:test (default-test) @ mavenTest —
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[DelegatingClassLoader@6eafb10e] error at io\qameta\allure\aspects\StepsAspects.java::0 the @annotation pointcut expression is only supported at Java 5 compliance level or above
[DelegatingClassLoader@6eafb10e] error at io\qameta\allure\aspects\AttachmentsAspects.java::0 the @annotation pointcut expression is only supported at Java 5 compliance level or above
[INFO] Running JavaTest
[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver
[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Latest version of chromedriver is 70.0.3538.16
[main] INFO io.github.bonigarcia.wdm.Downloader - Using binary driver previously downloaded
[main] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as C:\Users\Riccio.m2\repository\webdriver\chromedriver\win32\70.0.3538.16\chromedriver.exe
Starting ChromeDriver 70.0.3538.16 (16ed95b41bb05e565b11fb66ac33c660b721f778) on port 4190
Only local connections are allowed.
окт. 03, 2018 11:59:43 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
окт. 03, 2018 11:59:45 AM com.codeborne.selenide.webdriver.WebDriverFactory logBrowserVersion
INFO: BrowserName=chrome Version=69.0.3497.100 Platform=XP
окт. 03, 2018 11:59:45 AM com.codeborne.selenide.webdriver.WebDriverFactory createWebDriver
INFO: Selenide v. 4.12.3
окт. 03, 2018 11:59:45 AM com.codeborne.selenide.webdriver.WebDriverFactory logSeleniumInfo
INFO: Selenium WebDriver v. 3.13.0 build time: 2018-06-25T15:24:21.231Z
окт. 03, 2018 11:59:45 AM com.codeborne.selenide.impl.WebDriverThreadLocalContainer createDriver
INFO: Create webdriver in current thread 1: ChromeDriver → ChromeDriver: chrome on XP (f8da59957e324361cc35dd2bab500302)
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.375 s - in JavaTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] — allure-maven:2.9:serve (default-cli) @ mavenTest —
[INFO] Allure installation directory D:\IdeaProjects\mavenTest/.allure
[INFO] Try to finding out allure 2.0.1
[INFO] Generate Allure report (serve) with version 2.0.1
[INFO] Generate Allure report to D:\IdeaProjects\mavenTest/target/allure-reports
[INFO] Found results directory D:\IdeaProjects\mavenTest\target\allure-results
[INFO] Can’t find information about categories.
[INFO] Generate report to D:\IdeaProjects\mavenTest\target\allure-reports
Generating report to temp directory…
Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement
at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.(JaxbAnnotationIntrospector.java:139)
at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.(JaxbAnnotationIntrospector.java:126)
at io.qameta.allure.context.JacksonContext.(JacksonContext.java:24)
at io.qameta.allure.ConfigurationBuilder.useDefault(ConfigurationBuilder.java:50)
at io.qameta.allure.Commands.createReportConfiguration(Commands.java:158)
at io.qameta.allure.Commands.generate(Commands.java:63)
at io.qameta.allure.Commands.serve(Commands.java:88)
at io.qameta.allure.CommandLine.run(CommandLine.java:136)
at java.base/java.util.Optional.orElseGet(Optional.java:369)
at io.qameta.allure.CommandLine.main(CommandLine.java:72)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlElement
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
… 10 more
[ERROR] Can’t generate allure report data
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:153)
at io.qameta.allure.maven.AllureCommandline.execute (AllureCommandline.java:88)
at io.qameta.allure.maven.AllureCommandline.serve (AllureCommandline.java:73)
at io.qameta.allure.maven.AllureServeMojo.generateReport (AllureServeMojo.java:52)
at io.qameta.allure.maven.AllureGenerateMojo.executeReport (AllureGenerateMojo.java:137)
at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:255)
at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:143)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.598 s
[INFO] Finished at: 2018-10-03T11:59:53+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.qameta.allure:allure-maven:2.9:serve (default-cli) on project mavenTest: An error has occurred in Allure report generation.: Could not generate the report: Can’t generate allure report data: Process exited with an error: 1 (Exit value: 1) → [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] MojoExecutionException - Apache Maven - Apache Software Foundation
Process finished with exit code 1
у вас в этом проблема, я хз как это фиксить, надо гуглить. какая-то проблема с репозиторием…