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. [HDU6212]Zuma

    题目大意: 祖玛游戏. 给你一个01串,你可以往里面加一些0或1,如果连续的0或1超过3个,那么就可以消去.问消去所有的珠子至少要加几个珠子. 思路: 区间DP. 首先把原来的01串,改成存储连续的同 ...

  2. Problem H: 深入浅出学算法009-韩信点兵

    Description 秦朝末年,楚汉相争.有一次,韩信将1500名将士与楚王大将李锋交战.苦战一场,楚军不敌,败退回营,汉军也死伤四五百人,于是,韩信整顿兵马也返回大本营.当行至一山坡,忽有后军来报 ...

  3. 【机器学习算法-python实现】决策树-Decision tree(2) 决策树的实现

    (转载请注明出处:http://blog.csdn.net/buptgshengod) 1.背景      接着上一节说,没看到请先看一下上一节关于数据集的划分数据集划分.如今我们得到了每一个特征值得 ...

  4. Android intent action大全

    android.intent.action.ALL_APPSandroid.intent.action.ANSWERandroid.intent.action.ATTACH_DATAandroid.i ...

  5. 5V and 3V Level Translators

    http://www.daycounter.com/Circuits/Level-Translators/Level-Translators.phtml Interfacing 5V and 3V l ...

  6. C#线程安全的那些事

    还是上一次,面试的时候提到了C#线程安全的问题,当时回答的记不太清了,大概就是多线程同是调用某一个函数时可能会照成数据发生混乱,运行到最后发现产生的结果或数据并不是自己想要的,或是跨线程调用属性或方法 ...

  7. 达芬奇TI DVSDK之视频数据流过程分析

    作者:openwince@gmail.com 博客:http://www.cnblogs.com/tinz    本文的copyright归openwince@gmail.com所有,使用GPL发布, ...

  8. mysql 连接出错 'mysqladmin flush-hosts'

    本文章 转载于: http://blog.itechol.com/space-33-do-blog-id-5670.html    求助QQ:499628121   环境说明:   内网测试服务器19 ...

  9. OPC服务器开发浅谈 — 服务器模型(转)

    这里主要讨论的是OPC Data Access 2.0服务器的开发,在掌握了这个最常用的OPC服务器开发之后,对其它类型的OPC服务器,如A&E.HDA等就可以触类旁通了. 一个OPC服务器的 ...

  10. java变量深入理解

    4,变量:其实就是内存中的一个存储空间,用于存储常量数据. 作用:方便于运算.因为有些数据不确定.所以确定该数据的名词和存储空间. 特点:变量空间可以重复使用. 什么时候定义变量?只要是数据不确定的时 ...