无法为多个输入文件jtl文件生成jmeter图

时间:2015-09-25 13:39:44

标签: maven maven-2 maven-3 maven-plugin jmeter-maven-plugin

我在maven中使用jmeter-graph-maven-plugin来生成图形报告。我已经将插件配置为在每次执行中作为输入单个jtl文件,但是在运行之后只有第一个输入文件在第一次执行时生成报告,剩下的执行具有jtl文件不生成任何图形。下面是我在pom文件中的插件配置。

<plugin>
<groupId>de.codecentric</groupId>
    <artifactId>jmeter-graph-maven-plugin</artifactId>
    <version>0.1.0</version>
    <executions>
      <execution>
        <id>create-graphs-1</id>
        <goals>
          <goal>create-graph</goal>
        </goals>
        <phase>verify</phase>
        <configuration>
          <inputFile>${project.build.directory}/jmeter/results/catlyst2-10users.jtl</inputFile>
          <graphs>
            <graph>
              <pluginType>ThreadsStateOverTime</pluginType>
              <width>800</width>
              <height>600</height>
              <outputFile>${project.build.directory}/jmeter/results/ThreadsStateOverTime-10user.png</outputFile>
            </graph>
            <graph>
                <pluginType>ResponseTimesOverTime</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseTimesOverTime-10user.png</outputFile>
            </graph>
            <graph>
                <pluginType>TransactionsPerSecond</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/TransactionsPerSecond-10user.png</outputFile>
             </graph>
             <graph>
                <pluginType>HitsPerSecond</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/HitsPerSecond-10user.png</outputFile>
            </graph>
            <graph>
                <pluginType>BytesThroughputOverTime</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/BytesThroughputOverTime-10user.png</outputFile>
            </graph>
            <graph>
                <pluginType>LatenciesOverTime</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/LatenciesOverTime-10user.png</outputFile>
             </graph>
            <graph>
                <pluginType>ResponseCodesPerSecond</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseCodesPerSecond-10user.png</outputFile>
             </graph>
            <graph>
                <pluginType>ResponseTimesDistribution</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseTimesDistribution-10user.png</outputFile>
             </graph>
            <graph>
                <pluginType>ResponseTimesPercentiles</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseTimesPercentiles-10user.png</outputFile>
             </graph>
            <graph>
                <pluginType>TimesVsThreads</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/TimesVsThreads-10user.png</outputFile>
             </graph>
            <graph>
                <pluginType>ThroughputVsThreads</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ThroughputVsThreads-10user.png</outputFile>
             </graph>
          </graphs>
         <processAllFilesFound>true</processAllFilesFound>
        </configuration>
        </execution>
            <execution>
                <id>create-graphs-2</id>
                    <configuration>
                        <inputFile>${project.build.directory}/jmeter/results/catlyst2-20users.jtl</inputFile>
          <graphs>
            <graph>
              <pluginType>ThreadsStateOverTime</pluginType>
              <width>800</width>
              <height>600</height>
              <outputFile>${project.build.directory}/jmeter/results/ThreadsStateOverTime-20users.png</outputFile>
            </graph>
            <graph>
                <pluginType>ResponseTimesOverTime</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseTimesOverTime-20users.png</outputFile>
            </graph>
            <graph>
                <pluginType>TransactionsPerSecond</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/TransactionsPerSecond-20users.png</outputFile>
             </graph>
             <graph>
                <pluginType>HitsPerSecond</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/HitsPerSecond-20users.png</outputFile>
            </graph>
            <graph>
                <pluginType>BytesThroughputOverTime</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/BytesThroughputOverTime-20users.png</outputFile>
            </graph>
            <graph>
                <pluginType>LatenciesOverTime</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/LatenciesOverTime-20users.png</outputFile>
             </graph>
            <graph>
                <pluginType>ResponseCodesPerSecond</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseCodesPerSecond-20users.png</outputFile>
             </graph>
            <graph>
                <pluginType>ResponseTimesDistribution</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseTimesDistribution-20users.png</outputFile>
             </graph>
            <graph>
                <pluginType>ResponseTimesPercentiles</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseTimesPercentiles-20users.png</outputFile>
             </graph>
            <graph>
                <pluginType>TimesVsThreads</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/TimesVsThreads-20users.png</outputFile>
             </graph>
            <graph>
                <pluginType>ThroughputVsThreads</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ThroughputVsThreads-20users.png</outputFile>
             </graph>
          </graphs>
        <processAllFilesFound>true</processAllFilesFound>
        </configuration>
    </execution>
    <execution>
        <id>create-graphs-3</id>
        <configuration>
          <inputFile>${project.build.directory}/jmeter/results/catlyst2-30users.jtl</inputFile>
          <graphs>
            <graph>
              <pluginType>ThreadsStateOverTime</pluginType>
              <width>800</width>
              <height>600</height>
              <outputFile>${project.build.directory}/jmeter/results/ThreadsStateOverTime-30users.png</outputFile>
            </graph>
            <graph>
                <pluginType>ResponseTimesOverTime</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseTimesOverTime-30users.png</outputFile>
            </graph>
            <graph>
                <pluginType>TransactionsPerSecond</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/TransactionsPerSecond-30users.png</outputFile>
             </graph>
             <graph>
                <pluginType>HitsPerSecond</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/HitsPerSecond-30users.png</outputFile>
            </graph>
            <graph>
                <pluginType>BytesThroughputOverTime</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/BytesThroughputOverTime-30users.png</outputFile>
            </graph>
            <graph>
                <pluginType>LatenciesOverTime</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/LatenciesOverTime-30users.png</outputFile>
             </graph>
            <graph>
                <pluginType>ResponseCodesPerSecond</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseCodesPerSecond-30users.png</outputFile>
             </graph>
            <graph>
                <pluginType>ResponseTimesDistribution</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseTimesDistribution-30users.png</outputFile>
             </graph>
            <graph>
                <pluginType>ResponseTimesPercentiles</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ResponseTimesPercentiles-30users.png</outputFile>
             </graph>
            <graph>
                <pluginType>TimesVsThreads</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/TimesVsThreads-30users.png</outputFile>
             </graph>
            <graph>
                <pluginType>ThroughputVsThreads</pluginType>
                <width>800</width>
                <height>600</height>
                <outputFile>${project.build.directory}/jmeter/results/ThroughputVsThreads-30users.png</outputFile>
             </graph>
          </graphs>
        </configuration>
      </execution>
    </executions>
  </plugin>

}

1 个答案:

答案 0 :(得分:0)

尝试将目标放入所有执行中。你只在第一个中拥有它。

<goals>
    <goal>create-graph</goal>
</goals>