Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jxc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
test
jxc
Commits
2733ad5c
Commit
2733ad5c
authored
Jan 09, 2023
by
王腾飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete build.xml
parent
c5fbc239
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
69 deletions
+0
-69
build.xml
+0
-69
No files found.
build.xml
deleted
100644 → 0
View file @
c5fbc239
<?xml version="1.0" encoding="UTF-8"?>
<project
name=
"ant-jmeter-test"
default=
"run"
basedir=
"."
>
<tstamp>
<format
property=
"time"
pattern=
"yyyyMMddHHmm"
/>
</tstamp>
<!-- 需要改成自己本地的Jmeter目录-->
<property
name=
"jmeter.home"
value=
"/usr/local/apache-jmeter-5.4.1"
/>
<!-- jmeter生成jtl格式的结果报告的路径-->
<property
name=
"jmeter.result.jtl.dir"
value=
"/jmeter/report/jtl"
/>
<!-- jmeter生成html格式的结果报告的路径-->
<property
name=
"jmeter.result.html.dir"
value=
"/jmeter/report/html"
/>
<!-- 生成的报告的前缀-->
<property
name=
"ReportName"
value=
"TestReport"
/>
<property
name=
"jmeter.result.jtlName"
value=
"${jmeter.result.jtl.dir}/${ReportName}${time}.jtl"
/>
<property
name=
"jmeter.result.htmlName"
value=
"${jmeter.result.html.dir}/${ReportName}${time}.html"
/>
<!-- 输出生成的报告名称和存放路径-->
<echo
message=
"${jmeter.result.jtlName}"
/>
<echo
message=
"${jmeter.result.htmlName}"
/>
<echo
message=
"${jmeter.result.html.dir}"
/>
<target
name=
"run"
>
<antcall
target=
"test"
/>
<antcall
target=
"report"
/>
</target>
<!-- 指定ant-jmeter-1.1.1.jar 的位置 -->
<path
id=
"jmeter.classpath"
>
<fileset
dir=
"${jmeter.home}/extras"
>
<include
name=
"ant-jmeter-1.1.1.jar"
/>
</fileset>
</path>
<!--加载jar包,解决显示时间问题-->
<path
id=
"xslt.classpath"
>
<fileset
dir=
"${jmeter.home}/lib"
includes=
"xalan*.jar"
/>
<fileset
dir=
"${jmeter.home}/lib"
includes=
"serializer*.jar"
/>
</path>
<target
name=
"test"
>
<taskdef
name=
"jmeter"
classname=
"org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"
/>
<jmeter
jmeterhome=
"${jmeter.home}"
resultlog=
"${jmeter.result.jtlName}"
>
<!-- 声明要运行的脚本。"*.jmx"指包含此目录下的所有jmeter脚本,比如test*。jmx表示以test开头的所有.jmx文件-->
<testplans
dir=
"autoscript/execute"
includes=
"*.jmx"
/>
<!-- 声明ant执行jmeter时,传入jmeter的属性值,可以自定义必须是xml格式 -->
<property
name=
"jmeter.save.saveservice.output_format"
value=
"xml"
/>
</jmeter>
</target>
<target
name=
"report"
>
<tstamp>
<format
property=
"report.datestamp"
pattern=
"yyyy-MM-dd HH:mm"
/></tstamp>
<xslt
classpathref=
"xslt.classpath"
force=
"true"
in=
"${jmeter.result.jtlName}"
out=
"${jmeter.result.htmlName}"
style=
"${jmeter.home}/extras/jmeter-results-detail-report_21.xsl"
>
<!--jmeter-results-detail-report_21.xsl这里的文件名可以换成你想要的报告效果-->
<!--显示dateReport的时间-->
<param
name=
"dateReport"
expression=
"${report.datestamp}"
/>
</xslt>
<!-- 因为上面生成报告的时候,不会将相关的图片也一起拷贝至目标目录,所以,需要手动拷贝 -->
<copy
todir=
"${jmeter.result.html.dir}"
>
<fileset
dir=
"${jmeter.home}/extras"
>
<include
name=
"collapse.png"
/>
<include
name=
"expand.png"
/>
</fileset>
</copy>
</target>
</project>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment