当前位置:网站首页>JMeter saves test process data in page form
JMeter saves test process data in page form
2022-07-21 23:44:00 【The test is super standard】
Catalog
Depending on environment configuration
overview
New XSL stylesheet for JMeter command line results report( Hyperlinks ), Used to hold jmeter Interface test process data , Stored in .html file .
There are configured ones after the text jmeter package , Put in your own jmeter file , Execute and get the report .
Results Preview :
Depending on environment configuration
- ant To configure
- To configure build.xml、 To configure jmeter.properties
The configuration process is more error prone , The configuration is provided at the end of the article build.xml、jmeter.properties Of jmeter package , Good configuration ANT after , Put your own script and execute .
ant To configure
decompression apache-ant-1.10.1-bin.zip Go to a directory ( No installation required ), Such as C:\software\apache-ant-1.10.1
To configure Ant environment variable : New environment variable ( hold ant Add the directory to the environment variable )
ANT_HOME:C:\software\apache-ant-1.10.1
In environment variable PATH Add... To the last side of ;%ANT_HOME%\bin
Pay attention to the semicolon ahead , If PATH There is no semicolon at the end of the ";" If so, add , If so, you can remove .
Get into cmd Command window , stay CMD Enter... In the window ant -version, Hit the back to city key , Will show you the installed ANT edition , If the success shows , The configuration is successful .
To configure build.xml
- open jmeter In the catalog extras/build.xml file , Find the following places
<!-- 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}"/>
Add the following properties :
<!-- 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}"/>
These values correspond to bin/jmeter.properties Whether the file settings are displayed in the report . Such as :
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
# Only available with HttpClient4
jmeter.save.saveservice.connect_time=true
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
# Only available with HttpClient4
jmeter.save.saveservice.sent_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
Then go on extras/build.xml Find out ( Different jemter The version is slightly different , The main content remains unchanged ).
<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 style The property value is jmeter-results-shanhe-me.xsl
, Be careful , This value is the file name of the generated report style , The file name of this file downloaded from the official website is :jmeter.results.shanhe.me.xsl, So after downloading , You need to change the name of the downloaded file to :jmeter-results-shanhe-me.xsl, Otherwise, it will be reported that the file does not exist .
<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>
File run
Put the script that needs to be run into JMeter Under the extras Catalog , Then switch to extras Catalog
function :ant -Dtest= Script name
Configured jmeter package :
link :https://pan.baidu.com/s/1lMxYZfM6-1pM72TSaoryPQ
Extraction code :qjzs
边栏推荐
- 修改ip地址后在终端使用ifconfig查看IP地址没有更新
- JMeter之BeanShell生成随机汉字
- About the solution of "indentation error: unindent does not match any outside indentation level"
- 使用idea运行CS项目后“客户端页面加载不出来“的解决方法
- Day02 测试用例知识点总结(上)
- Jenkins build
- Zhiqiu
- 快速解决电脑无线网络无法连接问题
- “jmeter使用xpath提取器获取请求响应中的value值作为下一个请求的输入”案例
- How to do app installation test?
猜你喜欢
随机推荐
团队人员英文简称
postman newman jenkins
jmeter脚本生成基于rap2
“cannot get hvm parameter CONSOLE_EVTCHN (18): -22!” Solution of
【初识Jmeter和线程组】
ms17_ 010 invading win7
建表后重新修改编码格式
Set up form
sysstat安装并升级到11.5.5版本
Audio and video development learning notes (I)
JDBC access database
How to write the use case of APP login function?
"JMeter uses the XPath extractor to obtain the value value in the request response as the input of the next request" case
Jenkins continuous integration automation test practice (Part 2)
Motion recovery structure (3D reconstruction task3-1)
How to do app upgrade test?
页面重定向
设置表单
[project acceptance] record the user's concerns of the latest project acceptance
JMeter之以页面形式保存测试过程数据