">
美文网首页
build.xml文件

build.xml文件

作者: 首席咸鱼Sydni籽 | 来源:发表于2018-05-04 14:53 被阅读0次

    <?xml version="1.0" encoding="UTF8"?>
    <project name="JmeterTest" default="all" basedir=".">
    <tstamp>
    <format property="time" pattern="yyyy-MM-dd-hhmm" />
    </tstamp>

    <property name="jmeter.home" value="e:\Interface automation\apache-jmeter-3.1" />

    <property name="jmeter.result.jtl.dir" value="E:\Interface automation\jenkins-2.54\result\jtl" />
    <property name="jmeter.result.html.dir" value="E:\Interface automation\jenkins-2.54\result\html" />
    <property name="jmeter.result.html.dir2" value="E:\Interface automation\jenkins-2.54\result\html" />

    <!-- 生成的报告的前缀 report_name由jenkins传进来-->
    <property name="jmeter.result.htmlName" value="${jmeter.result.html.dir}/${report_name}.html" /> 
    

    <property name="jmeter.result.htmlName2" value="${jmeter.result.html.dir2}/${report_name}_other.html" />

    <property name="jmeter.save.saveservice.output_format" value="xml"/>

    <property name="ComputerName" value="sydni" /> 
    <target name="all">
        <antcall target="test" />
        <antcall target="report" />
    </target>
    <target name="test">
        <taskdef name="jmeter" classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask" />
        <jmeter jmeterhome="${jmeter.home}" resultlog="${jmeter.result.jtlName}">
            <!-- 声明要运行的脚本。"*.jmx"指包含此目录下的所有jmeter脚本 -->
            <testplans dir="e:\Interface automation\apache-jmeter-3.1\sydni_jmx" includes="turntable.jmx" />
        </jmeter>
    </target>
    <target name="report">
        <xslt in="${jmeter.result.jtlName}" out="${jmeter.result.htmlName}" style="${jmeter.home}/extras/jmeter.results.shanhe.me.xsl" />
    
        <xslt in="${jmeter.result.jtlName}" out="${jmeter.result.htmlName2}" style="${jmeter.home}/extras/jmeter-results-detail-report_21.xsl"> 
            <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>

    相关文章

      网友评论

          本文标题:build.xml文件

          本文链接:https://www.haomeiwen.com/subject/rmmdrftx.html