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. Git 历险记

    Git历险记(一) 作为分布式版本控制系统的重要代表--Git已经为越来越多的人所认识,它相对于我们熟悉的CVS.SVN甚至同时分布式控制系统的Mercurial,有哪些优势和不足呢.这次InfoQ中 ...

  2. linux下elasticsearch安装教程

    centos 7.5安装 elasticsearch 第一步,安装elasticsearch需要Java8 首先使用 yum list installed | grep java 查看安装的Java版 ...

  3. Codeforces Round #287 (Div. 2) C. Guess Your Way Out! 水题

    C. Guess Your Way Out! time limit per test 1 second memory limit per test 256 megabytes input standa ...

  4. JavaScript将具有父子关系的原始数据格式化成树形结构数据(id,pid)

    前几天遇到一个树型组件(类似树形菜单)数据格式化的问题,由于后台把原始查询的数据直接返回给前端,父子关系并未构建,因此需要前端JS来完成,后台返回的数据和下面的测试数据相似. var data=[ { ...

  5. 在当前的webview中跳转到新的url 使用WebView组件显示网页

    如果希望点击链接由自己处理,而不是新开Android的系统browser中响应该链接.给WebView加一个事件监听对象(WebViewClient)并重写其中的一些方法:shouldOverride ...

  6. js:深入prototype(上:内存分析)

    /**  * 下面演示了通过原型的创建方式,使用基于原型的创建能够将属性和方法  * 设置为Person专有的,不能通过window来调用.  * 原型是javascript中的一个特殊对象,当一个函 ...

  7. 网络编程_Python-网络模型.

    http://xmdevops.blog.51cto.com/11144840/1861280

  8. OPC Server开发的几大境界

    OPC server的开发相对OPC client 更加困难,OPC server 的开发主要应用COM技术,主要应用书籍为潘爱民写的<COM入门和应用>,大量的技术有很大的可重用性,在开 ...

  9. Redis的主从复制设置与安装

    1 验证redis的主从复制,将过程抓图 实验步骤 A.  安装Redis B.  启动Master Redis C.  创建redis-slave.conf配置文件 改动Redisport和打开sl ...

  10. arcgis连接excel出现数据库失败 外部数据库驱动程序意外错误

    微软搞事情,删除以下更新就行:win7 KB4041678 KB4041681SERVER 2008 R2 KB4041678 KB4041681WIN10 KB4041676 KB4041691SE ...