我对 maven 和 jmeter 使用 jmeter-maven-plugin 在 jmeter 中,我有一些断言失败,但是为什么 maven 项目也标记为成功?谁来帮帮我。坦克!
这是我的 Maven 项目 pom.xml
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.10.1</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<overrideRootLogLevel>debug</overrideRootLogLevel>
<testFilesIncluded>
<jMeterTestFile>${includedTestFiles}</jMeterTestFile>
</testFilesIncluded>
<testFilesExcluded>
<excludeJMeterTestFile>${excluedTestFiles}</excludeJMeterTestFile>
</testFilesExcluded>
<jmeterPlugins>
<plugin>
<groupId>kg.apc</groupId>
<artifactId>jmeter-plugins-standard</artifactId>
</plugin>
</jmeterPlugins>
<propertiesJMeter>
<dateQueryValueS>${dateQueryValueS}</dateQueryValueS>>
</propertiesJMeter>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>kg.apc</groupId>
<artifactId>jmeter-plugins-standard</artifactId>
<version>1.3.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
这是构建
mvn verify -DincludedTestFiles=*unshipOrder.jmx -DexcluedTestFiles=noneOfExclued -DdateQueryValueS="2016-04-28 09:09:53"
[INFO]
[INFO] -------------------------------------------------------
[INFO] P E R F O R M A N C E T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO]
[info]
[debug] JMeter is called with the following command line arguments: -n -t E:\study\jmeter\src\test\jmeter\xbn-online-unshipOrder.jmx -l E:\study\jmeter\target\jmeter\results\20160513-xbn-online-unshipOrder.jtl -d E:\study\jmeter\target\jmeter -L DEBUG -j E:\study\jmeter\target\jmeter\logs\xbn-online-unshipOrder.jmx.log
[info] Executing test: xbn-online-unshipOrder.jmx
[debug] Creating summariser <summary>
[debug] Created the tree successfully using E:\study\jmeter\src\test\jmeter\xbn-online-unshipOrder.jmx
[debug] Starting the test @ Fri May 13 10:20:31 CST 2016 (1463106031631)
[debug] Waiting for possible shutdown message on port 4445
[debug] summary + 1 in 1s = 1.9/s Avg: 370 Min: 370 Max: 370 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0
[debug] summary + 1 in 0.1s = 10.4/s Avg: 64 Min: 64 Max: 64 Err: 1 (100.00%) Active: 0 Started: 1 Finished: 1
[debug] summary = 2 in 1s = 3.2/s Avg: 217 Min: 64 Max: 370 Err: 1 (50.00%)
[debug] Tidying up ... @ Fri May 13 10:20:32 CST 2016 (1463106032341)
[debug] ... end of run
[info] Completed Test: xbn-online-unshipOrder.jmx
[INFO]
[INFO] Test Results:
[INFO]
[INFO] Tests Run: 1, Failures: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.629 s
[INFO] Finished at: 2016-05-13T10:20:32+08:00
[INFO] Final Memory: 22M/223M
[INFO] ------------------------------------------------------------------------