Test Results File Format

Test Results


Disabling The <testResultsTimestamp>

By default this plugin will add a timestamp to each results file that it generates. If you do not want a timestamp added you can disable this behaviour by setting the<testResultsTimestamp> configuration setting to false.

+---+
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<testResultsTimestamp>false</testResultsTimestamp>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
+---+

Enabling <appendResultsTimestamp>

When <testResultsTimestamp> is set to true the default positioning of the timestamp is at the start of the results filename. You can set the <appendResultsTimestamp&gt to true to make the plugin add the timestamp to the end of the results filename.

+---+
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<appendResultsTimestamp>true</appendResultsTimestamp>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
+---+

Setting The <resultsFileNameDateFormat>

The default format for the timestamp added to results filenames created by the plugin is a basic ISO_8601 date format (YYYMMDD). You can modify the format of the timestamp by setting the<resultsFileNameDateFormat> configuration setting, we use a JodaTime DateTimeFormatter (See http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html)

+---+
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<resultsFileNameDateFormat>MMMM, yyyy</resultsFileNameDateFormat>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
+---+

Choosing The <resultsFileFormat>

JMeter is capable of creating .jtl (an XML format) test results and csv test results. By default this plugin uses the .jtl format so that it can scan the result file for failures. You can switch thos to csv format if you would prefer, but the plugin is currently unable to parse .csv files for failures and .csv files will not work with the JMeter Analysis Maven Plugin.

+---+
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<resultsFileFormat>csv</resultsFileFormat>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
+---+

Specify the <resultsDirectory>

By default all JMeter test result will be written to${project.base.directory}/target/jmeter/results. To can modify this by setting the<resultsDirectory> to an explicit file location.

+---+
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<resultsDirectory>/tmp/jmeter</resultsDirectory>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
+---+

Setting <ignoreResultFailures>

By default the this plugin will stop maven execution if any failures are found within the .jtl results file (it is currently unable to scan .csv results files so any failures in a csv file will be ignored). If you don't want the maven execution to stop you can tell the plugin to ignore failures using the<ignoreResultFailures> configuration setting.

+---+
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<ignoreResultFailures>true</ignoreResultFailures>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
+---+

Setting <suppressJMeterOutput>

By default all JMeter output is printed to the console. If you do not want to see all of the output generated by JMeter you can turn it off by setting the <suppressJMeterOutput> configurations setting to true.

+---+
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<suppressJMeterOutput>true</suppressJMeterOutput>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
+---+

Setting <skipTests>

You can now use the <skipTests> configurations setting to make maven skip the performance tests. Suggested configuration is as follows:

+---+
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
+---+

This will allow you to run:

mvn verify –DskipTests=true

And the performance test step will be skipped

Jmeter-Maven-Plugin高级应用:Test Results File Format-Test Results的更多相关文章

  1. JMeter 压测Server Agent无法监控资源问题,PerfMon Metrics Collector报Waiting for sample,Error loading results file - see file log, Can't accept UDP connections java.net.BindException: Address already in use 各种疑难杂症

    如何安装插件此博主已经说得很详细了. https://www.cnblogs.com/saryli/p/6596647.html 但是需注意几点: 1.修改默认端口,这样可以避免掉一个问题.Serve ...

  2. 【Jmeter中,保存测试结果xml时报 error loading results file -see log file 问题的处理办法】

    使用JMeter测试并发保存测试文件时报错:Error loading results file - see file log解决办法:新建一个文本文件(什么类型都可以),在文件中加上<?xml ...

  3. Jmeter+maven+Jenkins构建云性能测试平台(mark 推荐)

    转自:http://www.cnblogs.com/victorcai0922/archive/2012/06/20/2555502.html Jmeter+maven+Jenkins构建云性能测试平 ...

  4. Win10系统Jmeter+maven+Jenkins接口自动化环境搭建(一)

    Jmeter+maven+Jenkins实现接口自动化,需要使用idea或eclipse配置maven项目,这里我使用的是idea.具体步骤如下: 1.安装jmeter+jdk jmeter安装之前需 ...

  5. 学习Maven之Cobertura Maven Plugin

    cobertura-maven-plugin是个什么鬼? cobertura-maven-plugin是一个校验单元测试用例覆盖率的工具,可以生成一个测试覆盖率报告,可以给单元测试用例编写提供参考. ...

  6. 解决Jetty Maven Plugin:Please initialize the log4j system properly(转)

    解决Jetty Maven Plugin:Please initialize the log4j system properly.Jetty Maven Plugin环境: <plugin> ...

  7. Spring Boot Maven Plugin(一):repackage目标

    简介 Spring Boot Maven Plugin插件提供spring boot在maven中的支持.允许你打包可运行的jar包或war包. 插件提供了几个maven目标和Spring Boot ...

  8. 基于Jmeter+maven+Jenkins构建性能自动化测试平台

      一.目的: 为能够将相关系统性能测试做为常规化测试任务执行,且可自动无人值守定时执行并输出性能测试结果报告及统计数据,因此基于Jmeter+maven+Jenkins构建了一套性能自动化测试平台 ...

  9. Spring Boot Maven Plugin打包异常及三种解决方法:Unable to find main class

    [背景]spring-boot项目,打包成可执行jar,项目内有两个带有main方法的类并且都使用了@SpringBootApplication注解(或者另一种情形:你有两个main方法并且所在类都没 ...

随机推荐

  1. [CF1086E]Beautiful Matrix(容斥+DP+树状数组)

    给一个n*n的矩阵,保证:(1)每行都是一个排列 (2)每行每个位置和上一行对应位置不同.求这个矩阵在所有合法矩阵中字典序排第几.考虑类似数位DP的做法,枚举第几行开始不卡限制,那么显然之前的行都和题 ...

  2. [BZOJ4571][SCOI2016]美味(贪心+主席树)

    经典问题,按位贪心,每次需要知道的是”在这一位之前的位都以确定的情况下,能否找到这一位是0/1的数”,这就是在询问[L,R]内某个值域区间是否有数,主席树即可. #include<cstdio& ...

  3. SQL SERVER 扩展属性的操作方法

    将数据库迁移到 Azure SQL 数据库时出现错误,不支持扩展属性“MS_Description”,因此就如何操作扩展属性进行在此记录. 查询扩展属性 SELECT *,OBJECT_NAME(ma ...

  4. hdu 3613 扩展kmp+回文串

    题目大意:给个字符串S,要把S分成两段T1,T2,每个字母都有一个对应的价值,如果T1,T2是回文串(从左往右或者从右往左读,都一样),那么他们就会有一个价值,这个价值是这个串的所有字母价值之和,如果 ...

  5. CF961E Tufurama【主席树】

    CF961E Tufurama 题意翻译 题目描述 有一天Polycarp决定重看他最喜爱的电视剧<Tufurama>.当他搜索“在线全高清免费观看Tufurama第3季第7集”却只得到第 ...

  6. BZOJ 2142 礼物 组合数学 CRT 中国剩余定理

    2142: 礼物 Time Limit: 10 Sec  Memory Limit: 259 MBSubmit: 1450  Solved: 593[Submit][Status][Discuss] ...

  7. UOJ #17. 【NOIP2014】飞扬的小鸟 背包DP

    #17. [NOIP2014]飞扬的小鸟 Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 4902  Solved: 1879 题目连接 http:// ...

  8. wikioi 1434 孪生素数 水题、素数模版

    1434 孪生素数 时间限制: 1 s 空间限制: 1000 KB 题目等级 : 白银 Silver 题目描述 Description 输出100以内的所有相差6的孪生素数:如, 5 11 7 13 ...

  9. centos7下redis-2.8.13安装笔记

    安装gcc 执行命令:yum install gcc 中间有两次提示,要求输入:yes 或 y,我们按照提示来就可以 至此安装成功 注意:如果不装gcc,解压redis后执行make命令会报错,如下图 ...

  10. 回顾下$.ajax()方法参数

    1.url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. 2.type: 要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如 ...