3

Тесты написаны в IntelliJ Idea. В POM.xml добавил:

<properties>
    <aspectj.version>1.7.4</aspectj.version>
    <allure.version>{latest-allure-version}</allure.version>
</properties>

В блок dependencies:

<dependency>
    <groupId>ru.yandex.qatools.allure</groupId>
    <artifactId>allure-junit-adaptor</artifactId>
    <version>1.4.23</version>
</dependency>`

В блок build:

<build>
    <plugins>
        <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>
    </plugins>
</build>

Блок reporting:

<reporting>
    <excludeDefaults>true</excludeDefaults>
    <plugins>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <resultsPattern>${project.build.directory}/allure-results</resultsPattern>
                <reportVersion>1.4.14</reportVersion>
            </configuration>
               </plugin>
    </plugins>
</reporting>`

Далее ввожу команду в терминал: mvn clean test site

Смотрите скрин результаты команды

Тест выполнился успешно, но при открытии отчета отображается текстовое сообщение выполнено 0 тестовых сценарий:

введите сюда описание изображения

В чем может быть проблема?

1 ответ 1

2

Скорей всего проблема в том, что используется разные версии отчета и адаптера. Попробуй изменить версию отчета в Мавен плагине на 1.4.23

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.