Allure: не удалось получить отчет для ru.yandex.qat ools.allure:allure-maven-plugin

Пытаюсь прикрутить Allure к своим тестам. Я начинаю, как указано в документации (https://github.com/allure-framework/allure-core/wiki#getting-started) Но есть ошибка, с которой не могу разобраться: mvn site

[INFO] --- maven-site-plugin:3.0:site (default-site) @ oiakProject ---
[INFO] configuring report plugin ru.yandex.qatools.allure:allure-maven-      plugin:1.4.14
Downloading:     http://repo.maven.apache.org/maven2/ru/yandex/qatools/allure/allure
-maven-plugin/1.4.14/allure-maven-plugin-1.4.14.pom
[WARNING] The POM for ru.yandex.qatools.allure:allure-maven-  plugin:jar:1.4.14 is
missing, no dependency information available
[INFO] --------------------------------------------------------------------- ---
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site- plugin:3.0:si
te (default-site) on project oiakProject: failed to get report for   ru.yandex.qat
ools.allure:allure-maven-plugin: Plugin ru.yandex.qatools.allure:allure-maven-pl
ugin:1.4.14 or one of its dependencies could not be resolved: Failed to read art
ifact descriptor for ru.yandex.qatools.allure:allure-maven-plugin:jar:1.4.14: Co
uld not find artifact ru.yandex.qatools.allure:allure-maven-plugin:pom:1.4.14 in
central (http://repo.maven.apache.org/maven2) -> [Help 1]

Вот мой pom.xml:

 <properties>
   <allure.version>1.4.14</allure.version>
   <aspectj.version>1.8.5</aspectj.version>
</properties>

  <dependencies> 
     <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-junit-adaptor</artifactId>
        <version>${allure.version}</version>
     </dependency>
  </dependencies>

<build>
  <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <version>3.3</version>
       <configuration>
         <source>1.8</source>
         <target>1.8</target>
       </configuration>
    </plugin>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.18.1</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>

     <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>
            <version>2.2</version>
        </plugin>
    </plugins>
</reporting>


person Ksu    schedule 23.06.2015    source источник
comment
Этот пример: github.com/allure-examples/allure-junit-example работать на тебя?   -  person vania-pooh    schedule 24.06.2015
comment
Моя версия Maven — 3.0.5, но, согласно установке плагина Allure Maven, она должна быть 3.1.1 или выше, поэтому я обновил Maven до 3.2.5 и делаю то же самое — появляется другая ошибка.   -  person Ksu    schedule 24.06.2015
comment
[ОШИБКА] Не удалось разрешить плагин org.apache.maven.plugins:maven-site-plugin:3.3 или одну из его зависимостей: не удалось прочитать дескриптор артефакта для org.apach e.maven.plugins:maven-site-plugin :jar:3.3: Не удалось передать артефакт org.apach e.maven.plugins:maven-site-plugin:pom:3.3 из/в центральный (repo.maven.ap ache.org/maven2): Ошибка подключения к repo.maven.apache.org: 443 [repo.maven.apache.org/18 5.31.17.215]: время ожидания подключения истекло   -  person Ksu    schedule 24.06.2015
comment
В любом случае, НАШ пример работает для вас?   -  person vania-pooh    schedule 24.06.2015
comment
vania-pooh, я попробовал этот пример, и команда «mvn site» выдает ту же ошибку, что и я.   -  person Ksu    schedule 24.06.2015
comment
Странно, только что перепроверил с последней версией кода, все работает. У вас есть собственный файл settings.xml для Maven?   -  person vania-pooh    schedule 24.06.2015
comment
Я нашел settings.xml здесь C:\Program Files\Apache Software Foundation\apache-maven-3.0.5\conf   -  person Ksu    schedule 25.06.2015
comment
Мой файл settings.xml слишком длинный, чтобы публиковать его здесь. P.S. Наконец через allure-cli я получил отчет.   -  person Ksu    schedule 25.06.2015
comment
используйте приведенную ниже версию версии адаптера junit allure. Это должно решить проблему. ‹allure.версия›1.4.0‹/allure.версия›   -  person HarshEc    schedule 09.11.2015


Ответы (1)


Похоже, эта проблема связана с корпоративным сетевым прокси. У меня тоже такая же проблема с Allure.

Я попытался настроить Git, клонировать репозиторий с Github и не смог. Я исправил эту проблему, установив в git config. Рекомендации:

Можно ли также установить конфигурацию прокси-сервера http (s) в конфигурационном файле Allure?

Мой пакетный файл:

@echo off

echo "Copying Test Assemblies"

copy D:\GIT\QA.Selenium\QA.Selenium\bin\Debug\*.*  D:\Execute_NUNIT_ALLURE\TestAssemblies\ 

echo "Setting Assembly Directory"
set ASSEMBLIES_DIR=D:\Execute_NUNIT_ALLURE\TestAssemblies

echo "Setting NUnit3 Directory"
set NUNIT_HOME=D:\NUnit-3.0.0

echo "Setting Allure Directory"
set ALLURE_CLI_HOME=D:\allure-cli

echo "Setting JAVA_HOME"
set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_65"

echo "Setting JRE_HOME"
set JRE_HOME="C:\Program Files\Java\jre1.8.0_65"

echo "Setting NUnit Test Output Directory"
set OUTPUT_DIR=D:\Execute_NUNIT_ALLURE\TestResults

echo "Setting Allure Report Directory"
set ALLURE_REPORT=D:\Execute_NUNIT_ALLURE\TestReports

echo "Executing NUnit Tests"
%NUNIT_HOME%\bin\nunit3-console %ASSEMBLIES_DIR%\QA.Selenium.dll /framework=net-4.0 

echo "Generating Allure Reports"
%JAVA_HOME%\bin\java -jar %ALLURE_CLI_HOME%\lib\allure-cli.jar report generate -v 2.1 %OUTPUT_DIR% -o %ALLURE_REPORT%

Мой вывод:

D:\Execute_NUNIT_ALLURE>NUnit_Allure.bat
"Copying Test Assemblies"
D:\GIT\QA.Selenium\QA.Selenium\bin\Debug\AllureCSharpCommons.dll
....
D:\GIT\QA.Selenium\QA.Selenium\bin\Debug\log4net.dll 
D:\GIT\QA.Selenium\QA.Selenium\bin\Debug\WebDriver.xml
       16 file(s) copied.
"Setting Assembly Directory"
"Setting NUnit3 Directory"
"Setting Allure Directory"
"Setting JAVA_HOME"
"Setting JRE_HOME"
"Setting NUnit Test Output Directory"
"Setting Allure Report Directory"
"Executing NUnit Tests"
NUnit Console Runner 3.0.5797
Copyright (C) 2015 Charlie Poole

Runtime Environment
   OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
  CLR Version: 4.0.30319.18034

Test Files
    D:\Execute_NUNIT_ALLURE\TestAssemblies\QA.Selenium.dll

=> QA.Selenium.Test_Scripts.LoginTest
#. Test Case Start: Login
Test Step - Visit URL
Test Step - Verify Login Page appeared
....
Test Case End
=> QA.Selenium.Test_Scripts.LogoutTest
#. Test Case Start: Logout
Test Step - Click Logout Link
...
Test Case End

Run Settings
    RuntimeFramework: net-4.0
    WorkDirectory: D:\Execute_NUNIT_ALLURE
    NumberOfTestWorkers: 8

Test Run Summary
    Overall result: Passed
   Tests run: 2, Passed: 2, Errors: 0, Failures: 0, Inconclusive: 0
     Not run: 0, Invalid: 0, Ignored: 0, Explicit: 0, Skipped: 0
  Start time: 2015-12-02 07:40:54Z
    End time: 2015-12-02 07:42:03Z
    Duration: 68.520 seconds

Results (nunit3) saved as TestResult.xml
"Generating Allure Reports"
I/O exception (java.net.SocketException) caught when processing request: Connect
ion reset
Retrying request
I/O exception (java.net.SocketException) caught when processing request: Connect
ion reset
Retrying request
I/O exception (java.net.SocketException) caught when processing request: Connect
ion reset
Retrying request
org.eclipse.aether.collection.DependencyCollectionException: Failed to read arti
fact descriptor for ru.yandex.qatools.allure:allure-report-data:jar:2.1
person Rohan Bhattarai    schedule 02.12.2015