jmeter修改报告模板
Posted Elvis_lfc
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jmeter修改报告模板相关的知识,希望对你有一定的参考价值。
JMeter has built-in ant integration, which allows us to run JMeter from command line. The result of running from command line is a JTL output file. This file is actually an XML file, and can be converted to an html file for better readability using an XSL stylesheet. HTML files converted using the stylesheet provided here will look similar to
Installation:
- Edit extras/build.xml in the JMeter distribution, locate
<!-- Force suitable defaults --> <property name="jmeter.save.saveservice.output_format" value="xml"/> <property name="jmeter.save.saveservice.assertion_results" value="all"/> <property name="jmeter.save.saveservice.bytes" value="true"/> <property name="file_format.testlog" value="$format"/> <property name="jmeter.save.saveservice.response_data.on_error" value="$funcMode"/>
and add as much information as you want, such as
<!-- Force suitable defaults --> <property name="jmeter.save.saveservice.response_data" value="true"/> <property name="jmeter.save.saveservice.samplerData" value="true"/> <property name="jmeter.save.saveservice.responseHeaders" value="true"/> <property name="jmeter.save.saveservice.requestHeaders" value="true"/> <property name="jmeter.save.saveservice.encoding" value="true"/> <property name="jmeter.save.saveservice.url" value="true"/> <property name="jmeter.save.saveservice.filename" value="true"/> <property name="jmeter.save.saveservice.hostname" value="true"/> <property name="jmeter.save.saveservice.thread_counts" value="true"/> <property name="jmeter.save.saveservice.sample_count" value="true"/> <property name="jmeter.save.saveservice.idle_time" value="true"/> <property name="jmeter.save.saveservice.output_format" value="xml"/> <property name="jmeter.save.saveservice.assertion_results" value="all"/> <property name="jmeter.save.saveservice.bytes" value="true"/> <property name="file_format.testlog" value="$format"/> <property name="jmeter.save.saveservice.response_data.on_error" value="$funcMode"/>
so that what you see in the JMeter GUI will be shown in the HTML file. The property names were found inbin/jmeter.properties.
- Locate in extras/build.xml again for
<target name="report" depends="_message_xalan"> <xslt classpathref="xslt.classpath" force="true" in="$testpath/$test.jtl" out="$testpath/$test.html" style="$basedir/jmeter-results-detail-report$style_version.xsl"> <param name="showData" expression="$show-data"/> </xslt> </target>
Change the style attribute to look like
<target name="report" depends="_message_xalan"> <xslt classpathref="xslt.classpath" force="true" in="$testpath/$test.jtl" out="$testpath/$test.html" style="$basedir/jmeter-results-shanhe-me.xsl"> <param name="showData" expression="$show-data"/> </xslt> </target>
- Download jmeter-results-shanhe-me.xsl by following the links at the bottom of the page, and save the file toextras/jmeter-results-shanhe-me.xsl.
- From the Command Prompt, change the current working directory to the extras folder, e.g., "cd C:\\jakarta-jmeter-2.4\\extras", and execute "ant". This will run Test.jmx and get Test.html.
Fig. 2. Execute ant from the Command Prompt. - You can also specify the path and the file name of the jmx file, e.g., you can run "ant -Dtest=Test -Dtestpath=C:\\jakarta-jmeter-2.4\\extras" to execute the same Test.jmx in the extras folder.
Fig. 3. Execute ant with the path and the file name specified from the Command Prompt.
The output HTML file is compatible with Ie8+/Opera/Firefox/Safari/Chrome.
- Download jmeter.results.shanhe.me.xsl.
修改后的build文件
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="ant-jmeter" default="all">
<description>
Sample build file for use with ant-jmeter.jar
See http://www.programmerplanet.org/pages/projects/jmeter-ant-task.php
To run a test and create the output report:
ant -Dtest=script
To run a test only:
ant -Dtest=script run
To run report on existing test output
ant -Dtest=script report
The "script" parameter is the name of the script without the .jmx suffix.
Additional options:
-Dshow-data=y - include response data in Failure Details
-Dtestpath=xyz - path to test file(s) (default user.dir).
N.B. Ant interprets relative paths against the build file
-Djmeter.home=.. - path to JMeter home directory (defaults to parent of this build file)
-Dreport.title="My Report" - title for html report (default is 'Load Test Results')
Deprecated:
-Dformat=2.0 - use version 2.0 JTL files rather than 2.1
</description>
<property name="testpath" value="$user.dir"/>
<property name="jmeter.home" value="$basedir/.."/>
<property name="report.title" value="Load Test Results"/>
<!-- Name of test (without .jmx) -->
<property name="test" value="Test"/>
<!-- Should report include response data for failures? -->
<property name="show-data" value="n"/>
<property name="format" value="2.1"/>
<condition property="style_version" value="">
<equals arg1="$format" arg2="2.0"/>
</condition>
<condition property="style_version" value="_21">
<equals arg1="$format" arg2="2.1"/>
</condition>
<condition property="funcMode">
<equals arg1="$show-data" arg2="y"/>
</condition>
<condition property="funcMode" value="false">
<not>
<equals arg1="$show-data" arg2="y"/>
</not>
</condition>
<!-- Allow jar to be picked up locally -->
<path id="jmeter.classpath">
<fileset dir="$basedir">
<include name="ant-jmeter*.jar"/>
</fileset>
</path>
<taskdef
name="jmeter"
classpathref="jmeter.classpath"
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"/>
<target name="all" depends="run,report"/>
<target name="run">
<echo>funcMode = $funcMode</echo>
<delete file="$testpath/$report.title.html"/>
<jmeter
jmeterhome="$jmeter.home"
testplan ="$testpath/$test.jmx"
resultlog="$testpath/$test.jtl">
<!--
<jvmarg value="-Xincgc"/>
<jvmarg value="-Xmx128m"/>
<jvmarg value="-Dproperty=value"/>
<jmeterarg value="-qextra.properties"/>
-->
<!-- Force suitable defaults -->
<property name="jmeter.save.saveservice.output_format" value="xml"/>
<property name="jmeter.save.saveservice.assertion_results" value="all"/>
<property name="jmeter.save.saveservice.bytes" value="true"/>
<property name="file_format.testlog" value="$format"/>
<property name="jmeter.save.saveservice.response_data.on_error" value="$funcMode"/>
</jmeter>
</target>
<property name="lib.dir" value="$jmeter.home/lib"/>
<!-- Use xalan copy from JMeter lib directory to ensure consistent processing with Java 1.4+ -->
<path id="xslt.classpath">
<fileset dir="$lib.dir" includes="xalan*.jar"/>
<fileset dir="$lib.dir" includes="serializer*.jar"/>
</path>
<target name="report" depends="xslt-report,copy-images">
<echo>Report generated at $report.datestamp</echo>
</target>
<!--
<target name="xslt-report" depends="_message_xalan">
<tstamp><format property="report.datestamp" pattern="yyyy/MM/dd HH:mm"/></tstamp>
<xslt
classpathref="xslt.classpath"
force="true"
in="$testpath/$test.jtl"
out="$testpath/$test.html"
style="$basedir/jmeter-results-detail-report$style_version.xsl">
<param name="showData" expression="$show-data"/>
<param name="titleReport" expression="$report.title"/>
<param name="dateReport" expression="$report.datestamp"/>
</xslt>
</target>
-->
<target name="xslt-report" depends="_message_xalan">
<tstamp><format property="report.datestamp" pattern="yyyy/MM/dd HH:mm"/></tstamp>
<xslt
classpathref="xslt.classpath"
force="true"
in="$testpath/$test.jtl"
out="$testpath/$report.title.html"
style="$basedir/jmeter-results-shanhe-me.xsl">
<param name="showData" expression="$show-data"/>
<param name="titleReport" expression="$report.title"/>
<param name="dateReport" expression="$report.datestamp"/>
</xslt>
</target>
<!-- Copy report images if needed -->
<target name="copy-images" depends="verify-images" unless="samepath">
<copy file="$basedir/expand.png" tofile="$testpath/expand.png"/>
<copy file="$basedir/collapse.png" tofile="$testpath/collapse.png"/>
</target>
<target name="verify-images">
<condition property="samepath">
<equals arg1="$testpath" arg2="$basedir" />
</condition>
</target>
<!-- Check that the xalan libraries are present -->
<condition property="xalan.present">
<and>
<!-- No need to check all jars; just check a few -->
<available classpathref="xslt.classpath" classname="org.apache.xalan.processor.TransformerFactoryImpl"/>
<available classpathref="xslt.classpath" classname="org.apache.xml.serializer.ExtendedContentHandler"/>
</and>
</condition>
<target name="_message_xalan" unless="xalan.present">
<echo>Cannot find all xalan and/or serialiser jars</echo>
<echo>The XSLT formatting may not work correctly.</echo>
<echo>Check you have xalan and serializer jars in $lib.dir</echo>
</target>
</project>
在################################################################################
# Apache JMeter Property file
################################################################################
## Licensed to the Apache Software Foundation (ASF) under one or more
## contributor license agreements. See the NOTICE file distributed with
## this work for additional information regarding copyright ownership.
## The ASF licenses this file to You under the Apache License, Version 2.0
## (the "License"); you may not use this file except in compliance with
## the License. You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
################################################################################
#
# THIS FILE SHOULD NOT BE MODIFIED
#
# This avoids having to re-apply the modifications when upgrading JMeter
# Instead only user.properties should be modified:
# 1/ copy the property you want to modify to user.properties from jmeter.properties
# 2/ Change its value there
#
################################################################################
#Preferred GUI language. Comment out to use the JVM default locale's language.
#language=en
# Additional locale(s) to add to the displayed list.
# The current default list is: en, fr, de, no, es, tr, ja, zh_CN, zh_TW, pl, pt_BR
# [see JMeterMenuBar#makeLanguageMenu()]
# The entries are a comma-separated list of language names
#locales.add=zu
#---------------------------------------------------------------------------
# XML Parser
#---------------------------------------------------------------------------
# Path to a Properties file containing Namespace mapping in the form
# prefix=Namespace
# Example:
# ns=http://biz.aol.com/schema/2006-12-18
#xpath.namespace.config=
#---------------------------------------------------------------------------
# SSL configuration
#---------------------------------------------------------------------------
## SSL System properties are now in system.properties
# JMeter no longer converts javax.xxx property entries in this file into System properties.
# These must now be defined in the system.properties file or on the command-line.
# The system.properties file gives more flexibility.
# By default, SSL session contexts are now created per-thread, rather than being shared.
# The original behaviour can be enabled by setting the JMeter property to true
#https.sessioncontext.shared=false
# Be aware that https default protocol may vary depending on the version of JVM
# See https://blogs.oracle.com/java-platform-group/entry/diagnosing_tls_ssl_and_https
# See https://bz.apache.org/bugzilla/show_bug.cgi?id=58236
# Default HTTPS protocol level:
#https.default.protocol=TLS
# This may need to be changed here (or in user.properties) to:
#https.default.protocol=SSLv3
# List of protocols to enable. You may have to select only a subset if you find issues with target server.
# This is needed when server does not support Socket version negotiation, this can lead to:
# javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
# java.net.SocketException: Connection reset
# see https://bz.apache.org/bugzilla/show_bug.cgi?id=54759
#https.socket.protocols=SSLv2Hello SSLv3 TLSv1
# Control if we allow reuse of cached SSL context between iterations
# set the value to 'false' to reset the SSL context each iteration
#https.use.cached.ssl.context=true
# Start and end index to be used with keystores with many entries
# The default is to use entry 0, i.e. the first
#https.keyStoreStartIndex=0
#https.keyStoreEndIndex=0
#---------------------------------------------------------------------------
# Look and Feel configuration
#---------------------------------------------------------------------------
#Classname of the Swing default UI
#
# The LAF classnames that are available are now displayed as ToolTip text
# when hovering over the Options/Look and Feel selection list.
#
# You can either use a full class name, as shown below,
# or one of the strings "System" or "CrossPlatform" which means
# JMeter will use the corresponding string returned by UIManager.get<name>LookAndFeelClassName()
# LAF can be overridden by os.name (lowercased, spaces replaced by '_')
# Sample os.name LAF:
#jmeter.laf.windows_xp=javax.swing.plaf.metal.MetalLookAndFeel
# Failing that, the OS family = os.name, but only up to first space:
# Sample OS family LAF:
#jmeter.laf.windows=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
# Mac apparently looks better with the System LAF
jmeter.laf.mac=System
# Failing that, the JMeter default laf can be defined:
#jmeter.laf=System
# If none of the above jmeter.laf properties are defined, JMeter uses the CrossPlatform LAF.
# This is because the CrossPlatform LAF generally looks better than the System LAF.
# See https://bz.apache.org/bugzilla/show_bug.cgi?id=52026 for details
# N.B. the laf can be defined in user.properties.
# LoggerPanel display
# default to false
#jmeter.loggerpanel.display=false
# Enable LogViewer Panel to receive log event even if closed
# Enabled since 2.12
# Note this has some impact on performances, but as GUI mode must
# not be used for Load Test it is acceptable
#jmeter.loggerpanel.enable_when_closed=true
# Max characters kept in LoggerPanel, default to 80000 chars
# 0 means no limit
#jmeter.loggerpanel.maxlength=80000
# HiDPI mode (default: false)
# Activate a 'pseudo'-hidpi mode. Allows to increase size of some UI elements
# which are not correctly managed by JVM with high resolution screens in Linux or Windows
#jmeter.hidpi.mode=false
# To enable pseudo-hidpi mode change to true
#jmeter.hidpi.mode=true
# HiDPI scale factor
#jmeter.hidpi.scale.factor=1.0
# Suggested value for HiDPI
#jmeter.hidpi.scale.factor=2.0
# Toolbar display
# Toolbar icon definitions
#jmeter.toolbar.icons=org/apache/jmeter/images/toolbar/icons-toolbar.properties
# Toolbar list
#jmeter.toolbar=new,open,close,save,save_as_testplan,|,cut,copy,paste,|,expand,collapse,toggle,|,test_start,test_stop,test_shutdown,|,test_start_remote_all,test_stop_remote_all,test_shutdown_remote_all,|,test_clear,test_clear_all,|,search,search_reset,|,function_helper,help
# Toolbar icons default size: 22x22. Available sizes are: 22x22, 32x32, 48x48
#jmeter.toolbar.icons.size=22x22
# Suggested value for HiDPI
#jmeter.toolbar.icons.size=48x48
# Icon definitions
# default:
#jmeter.icons=org/apache/jmeter/images/icon.properties
# alternate:
#jmeter.icons=org/apache/jmeter/images/icon_1.properties
# Historical icon set (deprecated)
#jmeter.icons=org/apache/jmeter/images/icon_old.properties
# Tree icons default size: 19x19. Available sizes are: 19x19, 24x24, 32x32, 48x48
# Useful for HiDPI display (see below)
#jmeter.tree.icons.size=19x19
# Suggested value for HiDPI screen like 3200x1800:
#jmeter.tree.icons.size=32x32
#Components to not display in JMeter GUI (GUI class name or static label)
# These elements are deprecated and will be removed in next version: MongoDB Script, MongoDB Source Config, Distribution Graph, Spline Visualizer
not_in_menu=org.apache.jmeter.protocol.mongodb.sampler.MongoScriptSampler, org.apache.jmeter.protocol.mongodb.config.MongoSourceElement, org.apache.jmeter.visualizers.DistributionGraphVisualizer, org.apache.jmeter.visualizers.SplineVisualizer
# Number of items in undo history
# Feature is disabled by default (0) due to known and not fixed bugs:
# https://bz.apache.org/bugzilla/show_bug.cgi?id=57043
# https://bz.apache.org/bugzilla/show_bug.cgi?id=57039
# https://bz.apache.org/bugzilla/show_bug.cgi?id=57040
# Set it to a number > 0 (25 can be a good default)
# The bigger it is, the more it consumes memory
#undo.history.size=0
# Hotkeys to add JMeter components, will add elements when you press Ctrl+0 .. Ctrl+9 (Command+0 .. Command+9 on Mac)
gui.quick_0=ThreadGroupGui
gui.quick_1=HttpTestSampleGui
gui.quick_2=RegexExtractorGui
gui.quick_3=AssertionGui
gui.quick_4=ConstantTimerGui
gui.quick_5=TestActionGui
gui.quick_6=JSR223PostProcessor
gui.quick_7=JSR223PreProcessor
gui.quick_8=DebugSampler
gui.quick_9=ViewResultsFullVisualizer
#---------------------------------------------------------------------------
# JMX Backup configuration
#---------------------------------------------------------------------------
#Enable auto backups of the .jmx file when a test plan is saved.
#When enabled, before the .jmx is saved, it will be backed up to the directory pointed
#by the jmeter.gui.action.save.backup_directory property (see below). Backup file names are built
#after the jmx file being saved. For example, saving test-plan.jmx will create a test-plan-000012.jmx
#in the backup directory provided that the last created backup file is test-plan-000011.jmx.
#Default value is true indicating that auto backups are enabled
#jmeter.gui.action.save.backup_on_save=true
#Set the backup directory path where JMX backups will be created upon save in the GUI.
#If not set (what it defaults to) then backup files will be created in
#a sub-directory of the JMeter base installation. The default directory is $JMETER_HOME/backups
#If set and the directory does not exist, it will be created.
#jmeter.gui.action.save.backup_directory=
#Set the maximum time (in hours) that backup files should be preserved since the save time.
#By default no expiration time is set which means we keep backups for ever.
#jmeter.gui.action.save.keep_backup_max_hours=0
#Set the maximum number of backup files that should be preserved. By default 10 backups will be preserved.
#Setting this to zero will cause the backups to not being deleted (unless keep_backup_max_hours is set to a non zero value)
#jmeter.gui.action.save.keep_backup_max_count=10
#---------------------------------------------------------------------------
# Remote hosts and RMI configuration
#---------------------------------------------------------------------------
# Remote Hosts - comma delimited
remote_hosts=127.0.0.1
#remote_hosts=localhost:1099,localhost:2010
# RMI port to be used by the server (must start rmiregistry with same port)
#server_port=1099
# To change the port to (say) 1234:
# On the server(s)
# - set server_port=1234
# - start rmiregistry with port 1234
# On Windows this can be done by:
# SET SERVER_PORT=1234
# JMETER-SERVER
#
# On Unix:
# SERVER_PORT=1234 jmeter-server
#
# On the client:
# - set remote_hosts=server:1234
# Parameter that controls the RMI port used by the RemoteSampleListenerImpl (The Controler)
# Default value is 0 which means port is randomly assigned
# You may need to open Firewall port on the Controller machine
#client.rmi.localport=0
# When distributed test is starting, there may be several attempts to initialize
# remote engines. By default, only single try is made. Increase following property
# to make it retry for additional times
#client.tries=1
# If there is initialization retries, following property sets delay between attempts
#client.retries_delay=5000
# When all initialization tries was made, test will fail if some remote engines are failed
# Set following property to true to ignore failed nodes and proceed with test
#client.continue_on_fail=false
# To change the default port (1099) used to access the server:
#server.rmi.port=1234
# To use a specific port for the JMeter server engine, define
# the following property before starting the server:
#server.rmi.localport=4000
# From JMeter 2.3.1, the jmeter server creates the RMI registry as part of the server process.
# To stop the server creating the RMI registry:
#server.rmi.create=false
# From JMeter 2.3.1, define the following property to cause JMeter to exit after the first test
#server.exitaftertest=true
#---------------------------------------------------------------------------
# Include Controller
#---------------------------------------------------------------------------
# Prefix used by IncludeController when building file name
#includecontroller.prefix=
#---------------------------------------------------------------------------
# Logging Configuration
#---------------------------------------------------------------------------
# Note: JMeter uses Avalon (Excalibur) LogKit
# Logging Format
# see http://excalibur.apache.org/apidocs/org/apache/log/format/PatternFormatter.html
#
# Default format:
#log_format=%time:yyyy/MM/dd HH:mm:ss %5.5priority - %category: %message %throwable
# \\n is automatically added to the end of the string
#
# Predefined formats in the JMeter LoggingManager:
#log_format_type=default
#log_format_type=thread_prefix
#log_format_type=thread_suffix
# default is as above
# thread_prefix adds the thread name as a prefix to the category
# thread_suffix adds the thread name as a suffix to the category
# Note that thread name is not included by default, as it requires extra processing.
#
# To change the logging format, define either log_format_type or log_format
# If both are defined, the type takes precedence
# Note that these properties cannot be defined using the -J or -D JMeter
# command-line flags, as the format will have already been determined by then
# However, they can be defined as JVM properties
#Logging levels for the logging categories in JMeter. Correct values are FATAL_ERROR, ERROR, WARN, INFO, and DEBUG
# To set the log level for a package or individual class, use:
# log_level.[package_name].[classname]=[PRIORITY_LEVEL]
# But omit "org.apache" from the package name. The classname is optional. Further examples below.
log_level.jmeter=INFO
log_level.jmeter.junit=DEBUG
#log_level.jmeter.control=DEBUG
#log_level.jmeter.testbeans=DEBUG
#log_level.jmeter.engine=DEBUG
#log_level.jmeter.threads=DEBUG
#log_level.jmeter.gui=WARN
#log_level.jmeter.testelement=DEBUG
#log_level.jmeter.util=WARN
#log_level.jmeter.protocol.http=DEBUG
# For CookieManager, AuthManager etc:
#log_level.jmeter.protocol.http.control=DEBUG
#log_level.jmeter.protocol.ftp=WARN
#log_level.jmeter.protocol.jdbc=DEBUG
#log_level.jmeter.protocol.java=WARN
#log_level.jmeter.testelements.property=DEBUG
log_level.jorphan=INFO
#Log file for log messages.
# You can specify a different log file for different categories via:
# log_file.[category]=[filename]
# category is equivalent to the package/class names described above
# Combined log file (for jmeter and jorphan)
#log_file=jmeter.log
# To redirect logging to standard output, try the following:
# (it will probably report an error, but output will be to stdout)
#log_file=
# Or define separate logs if required:
#log_file.jorphan=jorphan.log
#log_file.jmeter=jmeter.log
# If the filename contains paired single-quotes, then the name is processed
# as a SimpleDateFormat format applied to the current date, for example:
#log_file='jmeter_'yyyyMMddHHmmss'.tmp'
# N.B. When JMeter starts, it sets the system property:
# org.apache.commons.logging.Log
# to
# org.apache.commons.logging.impl.LogKitLogger
# if not already set. This causes Apache and Commons HttpClient to use the same logging as JMeter
# Further logging configuration
# Excalibur logging provides the facility to configure logging using
# configuration files written in XML. This allows for such features as
# log file rotation which are not supported directly by JMeter.
#
# If such a file specified, it will be applied to the current logging
# hierarchy when that has been created.
#
#log_config=logkit.xml
#---------------------------------------------------------------------------
# HTTP Java configuration
#---------------------------------------------------------------------------
# Number of connection retries performed by HTTP Java sampler before giving up
# 0 means no retry since version 3.0
#http.java.sampler.retries=0
#---------------------------------------------------------------------------
# Following properties apply to both Commons and Apache HttpClient
#---------------------------------------------------------------------------
# set the socket timeout (or use the parameter http.socket.timeout)
# for AJP Sampler and HttpClient3 implementation.
# Note for HttpClient3 implementation it is better to use GUI to set timeout
# or use http.socket.timeout in httpclient.parameters
# Value is in milliseconds
#httpclient.timeout=0
# 0 == no timeout
# Set the http version (defaults to 1.1)
#httpclient.version=1.1 (or use the parameter http.protocol.version)
# Define characters per second > 0 to emulate slow connections
#httpclient.socket.http.cps=0
#httpclient.socket.https.cps=0
#Enable loopback protocol
#httpclient.loopback=true
# Define the local host address to be used for multi-homed hosts
#httpclient.localaddress=1.2.3.4
#---------------------------------------------------------------------------
# AuthManager Kerberos configuration
#---------------------------------------------------------------------------
# AuthManager Kerberos configuration
# Name of application module used in jaas.conf
#kerberos_jaas_application=JMeter
# Should ports be stripped from urls before constructing SPNs
# for SPNEGO authentication
#kerberos.spnego.strip_port=true
#---------------------------------------------------------------------------
# Sample logging levels for Commons HttpClient
#---------------------------------------------------------------------------
# Commons HttpClient Logging information can be found at:
# http://hc.apache.org/httpclient-3.x/logging.html
# Note that full category names are used, i.e. must include the org.apache.
# Info level produces no output:
#log_level.org.apache.commons.httpclient=debug
# Might be useful:
#log_level.org.apache.commons.httpclient.Authenticator=trace
# Show headers only
#log_level.httpclient.wire.header=debug
# Full wire debug produces a lot of output; consider using separate file:
#log_level.httpclient.wire=debug
#log_file.httpclient=httpclient.log
#---------------------------------------------------------------------------
# Apache HttpClient logging examples
#---------------------------------------------------------------------------
# Enable header wire + context logging - Best for Debugging
#log_level.org.apache.http=DEBUG
#log_level.org.apache.http.wire=ERROR
# Enable full wire + context logging
#log_level.org.apache.http=DEBUG
# Enable context logging for connection management
#log_level.org.apache.http.impl.conn=DEBUG
# Enable context logging for connection management / request execution
#log_level.org.apache.http.impl.conn=DEBUG
#log_level.org.apache.http.impl.client=DEBUG
#log_level.org.apache.http.client=DEBUG
#---------------------------------------------------------------------------
# Apache HttpComponents HTTPClient configuration (HTTPClient4)
#---------------------------------------------------------------------------
# define a properties file for overriding Apache HttpClient parameters
# Uncomment this line if you put anything in hc.parameters file
#hc.parameters.file=hc.parameters
# Number of retries to attempt (default 0)
#httpclient4.retrycount=0
# Idle connection timeout (Milliseconds) to apply if the server does not send
# Keep-Alive headers (default 0)
# Set this > 0 to compensate for servers that don't send a Keep-Alive header
# If <= 0, idle timeout will only apply if the server sends a Keep-Alive header
#httpclient4.idletimeout=0
# Check connections if the elapsed time (Milliseconds) since the last
# use of the connection exceed this value
#httpclient4.validate_after_inactivity=2000
# TTL (in Milliseconds) represents an absolute value.
# No matter what, the connection will not be re-used beyond its TTL.
#httpclient4.time_to_live=2000
#---------------------------------------------------------------------------
# Apache HttpComponents Commons HTTPClient configuration (HTTPClient 3.1)
# DEPRECATED
#---------------------------------------------------------------------------
# define a properties file for overriding Commons HttpClient parameters
# See: http://hc.apache.org/httpclient-3.x/preference-api.html
# Uncomment this line if you put anything in httpclient.parameters file
#httpclient.parameters.file=httpclient.parameters
# Number of retries to attempt (default 0)
#httpclient3.retrycount=0
#---------------------------------------------------------------------------
# HTTP Cache Manager configuration
#---------------------------------------------------------------------------
#
# Space or comma separated list of methods that can be cached
#cacheable_methods=GET
# N.B. This property is currently a temporary solution for Bug 56162
# Since 2.12, JMeter does not create anymore a Sample Result with 204 response
# code for a resource found in cache which is inline with what browser do.
#cache_manager.cached_resource_mode=RETURN_NO_SAMPLE
# You can choose between 3 modes:
# RETURN_NO_SAMPLE (default)
# RETURN_200_CACHE
# RETURN_CUSTOM_STATUS
# Those mode have the following behaviours:
# RETURN_NO_SAMPLE : this mode returns no Sample Result, it has no additional configuration
# RETURN_200_CACHE : this mode will return Sample Result with response code to 200 and response message to "(ex cache)", you can modify response message by setting
# RETURN_200_CACHE.message=(ex cache)
# RETURN_CUSTOM_STATUS : This mode lets you select what response code and message you want to return, if you use this mode you need to set those properties
# RETURN_CUSTOM_STATUS.code=
# RETURN_CUSTOM_STATUS.message=
#---------------------------------------------------------------------------
# Results file configuration
#---------------------------------------------------------------------------
# This section helps determine how result data will be saved.
# The commented out values are the defaults.
# legitimate values: xml, csv, db. Only xml and csv are currently supported.
jmeter.save.saveservice.output_format=xml
# true when field should be saved; false otherwise
# assertion_results_failure_message only affects CSV output
#jmeter.save.saveservice.assertion_results_failure_message=true
#
# legitimate values: none, first, all
jmeter.save.saveservice.assertion_results=all
#
#jmeter.save.saveservice.data_type=true
#jmeter.save.saveservice.label=true
#jmeter.save.saveservice.response_code=true
# response_data is not currently supported for CSV output
jmeter.save.saveservice.response_data=true
# Save ResponseData for failed samples
jmeter.save.saveservice.response_data.on_error=true
#jmeter.save.saveservice.response_message=true
#jmeter.save.saveservice.successful=true
#jmeter.save.saveservice.thread_name=true
#jmeter.save.saveservice.time=true
#jmeter.save.saveservice.subresults=true
#jmeter.save.saveservice.assertions=true
#jmeter.save.saveservice.latency=true
#jmeter.save.saveservice.connect_time=false
jmeter.save.saveservice.samplerData=true
jmeter.save.saveservice.responseHeaders=true
jmeter.save.saveservice.requestHeaders=true
jmeter.save.saveservice.encoding=true
jmeter.save.saveservice.bytes=true
jmeter.save.saveservice.url=true
jmeter.save.saveservice.filename=true
jmeter.save.saveservice.hostname=true
jmeter.save.saveservice.thread_counts=true
jmeter.save.saveservice.sample_count=true
jmeter.save.saveservice.idle_time=true
# Timestamp format - this only affects CSV output files
# legitimate values: none, ms, or a format suitable for SimpleDateFormat
#jmeter.save.saveservice.timestamp_format=ms
#jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS
# For use with Comma-separated value (CSV) files or other formats
# where the fields' values are separated by specified delimiters.
# Default:
#jmeter.save.saveservice.default_delimiter=,
# For TAB, since JMeter 2.3 one can use:
#jmeter.save.saveservice.default_delimiter=\\t
# Only applies to CSV format files:
# Print field names as first line in CSV
#jmeter.save.saveservice.print_field_names=true
# Optional list of JMeter variable names whose values are to be saved in the result data files.
# Use commas to separate the names. For example:
#sample_variables=SESSION_ID,REFERENCE
# N.B. The current implementation saves the values in XML as attributes,
# so the names must be valid XML names.
# Versions of JMeter after 2.3.2 send the variable to all servers
# to ensure that the correct data is available at the client.
# Optional xml processing instruction for line 2 of the file:
# Example:
#jmeter.save.saveservice.xml_pi=<?xml-stylesheet type="text/xsl" href="../extras/jmeter-results-detail-report.xsl"?>
# Default value:
#jmeter.save.saveservice.xml_pi=
# Prefix used to identify filenames that are relative to the current base
#jmeter.save.saveservice.base_prefix=~/
# AutoFlush on each line written in XML or CSV output
# Setting this to true will result in less test results data loss in case of Crash
# but with impact on performances, particularly for intensive tests (low or no pauses)
# Since JMeter 2.10, this is false by default
#jmeter.save.saveservice.autoflush=false
#---------------------------------------------------------------------------
# Settings that affect SampleResults
#---------------------------------------------------------------------------
# Save the start time stamp instead of the end
# This also affects the timestamp stored in result files
sampleresult.timestamp.start=true
# Whether to use System.nanoTime() - otherwise only use System.currentTimeMillis()
#sampleresult.useNanoTime=true
# Use a background thread to calculate the nanoTime offset
# Set this to <= 0 to disable the background thread
#sampleresult.nanoThreadSleep=5000
#---------------------------------------------------------------------------
# Upgrade property
#---------------------------------------------------------------------------
# File that holds a record of name changes for backward compatibility issues
upgrade_properties=/bin/upgrade.properties
#---------------------------------------------------------------------------
# JMeter Test Script recorder configuration
#
# N.B. The element was originally called the Proxy recorder, which is why the
# properties have the prefix "proxy".
#---------------------------------------------------------------------------
# If the recorder detects a gap of at least 5s (default) between HTTP requests,
# it assumes that the user has clicked a new URL
#proxy.pause=5000
# Add numeric prefix to Sampler names (default true)
#proxy.number.requests=true
# List of URL patterns that will be added to URL Patterns to exclude
# Separate multiple lines with ;
#proxy.excludes.suggested=.*\\\\.(bmp|css|js|gif|ico|jpe?g|png|swf|woff)
# Change the default HTTP Sampler (currently HttpClient4)
# Java:
#jmeter.httpsampler=HTTPSampler
#or
#jmeter.httpsampler=Java
#
# Apache HTTPClient:
#jmeter.httpsampler=HTTPSampler2
#or
#jmeter.httpsampler=HttpClient3.1
#
# HttpClient4.x
#jmeter.httpsampler=HttpClient4
# By default JMeter tries to be more lenient with RFC2616 redirects and allows
# relative paths.
# If you want to test strict conformance, set this value to true
# When the property is true, JMeter follows http://tools.ietf.org/html/rfc3986#section-5.2
#jmeter.httpclient.strict_rfc2616=false
# Default content-type include filter to use
#proxy.content_type_include=text/html|text/plain|text/xml
# Default content-type exclude filter to use
#proxy.content_type_exclude=image/.*|text/css|application/.*
# Default headers to remove from Header Manager elements
# (Cookie and Authorization are always removed)
#proxy.headers.remove=If-Modified-Since,If-None-Match,Host
# Binary content-type handling
# These content-types will be handled by saving the request in a file:
#proxy.binary.types=application/x-amf,application/x-java-serialized-object
# The files will be saved in this directory:
#proxy.binary.directory=user.dir
# The files will be created with this file filesuffix:
#proxy.binary.filesuffix=.binary
#---------------------------------------------------------------------------
# Test Script Recorder certificate configuration
#---------------------------------------------------------------------------
#proxy.cert.directory=<JMeter bin directory>
#proxy.cert.file=proxyserver.jks
#proxy.cert.type=JKS
#proxy.cert.keystorepass=password
#proxy.cert.keypassword=password
#proxy.cert.factory=SunX509
# define this property if you wish to use your own keystore
#proxy.cert.alias=<none>
# The default validity for certificates created by JMeter
#proxy.cert.validity=7
# Use dynamic key generation (if supported by JMeter/JVM)
# If false, will revert to using a single key with no certificate
#proxy.cert.dynamic_keys=true
#---------------------------------------------------------------------------
# Test Script Recorder miscellaneous configuration
#---------------------------------------------------------------------------
# Whether to attempt disabling of samples that resulted from redirects
# where the generated samples use auto-redirection
#proxy.redirect.disabling=true
# SSL configuration
#proxy.ssl.protocol=TLS
#---------------------------------------------------------------------------
# JMeter Proxy configuration
#---------------------------------------------------------------------------
# use command-line flags for user-name and password
#http.proxyDomain=NTLM domain, if required by HTTPClient sampler
#---------------------------------------------------------------------------
# HTTPSampleResponse Parser configuration
#---------------------------------------------------------------------------
# Space-separated list of parser groups
HTTPResponse.parsers=htmlParser wmlParser cssParser
# for each parser, there should be a parser.types and a parser.className property
# CSS Parser based on ph-css
cssParser.className=org.apache.jmeter.protocol.http.parser.CssParser
cssParser.types=text/css
#---------------------------------------------------------------------------
# HTML Parser configuration
#---------------------------------------------------------------------------
# Define the HTML parser to be used.
# Default parser:
# This new parser (since 2.10) should perform better than all others
# see https://bz.apache.org/bugzilla/show_bug.cgi?id=55632
# Do not comment this property
htmlParser.className=org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
# Other parsers:
# Default parser before 2.10
#htmlParser.className=org.apache.jmeter.protocol.http.parser.JTidyHTMLParser
# Note that Regexp extractor may detect references that have been commented out.
# In many cases it will work OK, but you should be aware that it may generate
# additional references.
#htmlParser.className=org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
# This parser is based on JSoup, it should be the most accurate but less performant
# than LagartoBasedHtmlParser
#htmlParser.className=org.apache.jmeter.protocol.http.parser.JsoupBasedHtmlParser
#Used by HTTPSamplerBase to associate htmlParser with content types below
htmlParser.types=text/html application/xhtml+xml application/xml text/xml
#---------------------------------------------------------------------------
# WML Parser configuration
#---------------------------------------------------------------------------
wmlParser.className=org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
#Used by HTTPSamplerBase to associate wmlParser with content types below
wmlParser.types=text/vnd.wap.wml
#---------------------------------------------------------------------------
# Remote batching configuration
#---------------------------------------------------------------------------
# How is Sample sender implementations configured:
# - true (default) means client configuration will be used
# - false means server configuration will be used
#sample_sender_client_configured=true
# Remote batching support
# Since JMeter 2.9, default is MODE_STRIPPED_BATCH, which returns samples in
# batch mode (every 100 samples or every minute by default)
# Note also that MODE_STRIPPED_BATCH strips response data from SampleResult, so if you need it change to
# another mode
# Hold retains samples until end of test (may need lots of memory)
# Batch returns samples in batches
# Statistical returns sample summary statistics
# hold_samples was originally defined as a separate property,
# but can now also be defined using mode=Hold
# mode can also be the class name of an implementation of org.apache.jmeter.samplers.SampleSender
#mode=Standard
#mode=Batch
#mode=Hold
#mode=Statistical
#Set to true to key statistical samples on threadName rather than threadGroup
#key_on_threadname=false
#mode=Stripped
#mode=StrippedBatch
#mode=org.example.load.MySampleSender
#
#num_sample_threshold=100
# Value is in milliseconds
#time_threshold=60000
#
# Asynchronous sender; uses a queue and background worker process to return the samples
#mode=Asynch
# default queue size
#asynch.batch.queue.size=100
# Same as Asynch but strips response data from SampleResult
#mode=StrippedAsynch
#
# DiskStore: as for Hold mode, but serialises the samples to disk, rather than saving in memory
#mode=DiskStore
# Same as DiskStore but strips response data from SampleResult
#mode=StrippedDiskStore
# Note: the mode is currently resolved on the client;
# other properties (e.g. time_threshold) are resolved on the server.
# To set the Monitor Health Visualiser buffer size, enter the desired value
# monitor.buffer.size=800
#---------------------------------------------------------------------------
# JDBC Request configuration
#---------------------------------------------------------------------------
# Max number of PreparedStatements per Connection for PreparedStatement cache
#jdbcsampler.ma
以上是关于jmeter修改报告模板的主要内容,如果未能解决你的问题,请参考以下文章