Как сгенерировать «HTML отчеты» с использованием последней версии (3.1.1) jmeter-maven-plugin - PullRequest
1 голос
/ 14 июля 2020

Я могу создавать отчеты HTML, когда я использую jmeter-maven-plugin версии 2.8.0. Я четко вижу одну папку target \ jmeter \ reports . Однако, когда я использую версию 3.1.1 (последнюю), я не вижу эту папку вообще.

Пожалуйста, дайте мне знать, есть ли способ сгенерировать отчеты HTML с последней версией.

Ниже мой образец моей помпы. xml:

       <plugins>
           <plugin>
               <groupId>com.lazerycode.jmeter</groupId>
               <artifactId>jmeter-maven-plugin</artifactId>
               <version>2.8.0</version>
               <executions>
                   <!-- Run JMeter tests -->
                   <execution>
                       <id>jmeter-tests</id>
                       <goals>
                           <goal>jmeter</goal>
                       </goals>
                   </execution>
                   <execution>
                       <id>configuration</id>
                       <goals>
                           <goal>configure</goal>
                       </goals>
                   </execution>
                   <!-- Fail build on errors in test -->
                   <execution>
                       <id>jmeter-check-results</id>
                       <goals>
                           <goal>results</goal>
                       </goals>
                       <configuration>
                           <generateReports>true</generateReports>
                       </configuration>
                   </execution>
               </executions>
           </plugin>
       </plugins>
   </build> ```

1 Ответ

2 голосов
/ 14 июля 2020

Этот блок конфигурации :

<configuration>
   <generateReports>true</generateReports>
</configuration>

должен быть вне блока <execution>

Full pom. xml на всякий случай:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         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>org.example</groupId>
    <artifactId>jmeter</artifactId>
    <version>1.0-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                    <!-- Generate JMeter configuration -->
                    <execution>
                        <id>configuration</id>
                        <goals>
                            <goal>configure</goal>
                        </goals>
                    </execution>
                    <!-- Run JMeter tests -->
                    <execution>
                        <id>jmeter-tests</id>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                    <!-- Fail build on errors in test -->
                    <execution>
                        <id>jmeter-check-results</id>
                        <goals>
                            <goal>results</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <generateReports>true</generateReports>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Дополнительная информация:

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...