熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> Java開源技術 >> 正文

Ant+JMeter進行Web應用的穩定性測試[4]

2022-06-13   來源: Java開源技術 

    e綜合可以使用此方法來達要求當你想停止測試時則手動停止即可查看上面的這個build

    <! Simple Ant Jmeter test>
    <project name=antjmeter default=run basedir=>
    <property name=out value=/>
    <target name=test>
    <taskdef
    name=jmeter
    classname=orgprogrammerplanetanttaskdefsjmeterJMeterTask/>
    <jmeter
    jmeterhome=D:\ProgramFiles\jakartajmeter
    testplan=${basedir}/webjmx
    resultlog=${out}/webjtl>
    <jvmarg value=Dgroupthreads=/>
    </jmeter>
    <echo message=jmeter webjmx finished/>
    <antcall target=interval/>
    <antcall target=test/>
    <!ant antfile=buildxml/>
    </target>
    <!for execute target test many timescopy the target test
    to target test>
    <target name=test>
    <taskdef
    name=jmeter
    classname=orgprogrammerplanetanttaskdefsjmeterJMeterTask/>
    <jmeter
    jmeterhome=D:\ProgramFiles\jakartajmeter
    testplan=${basedir}/webjmx
    resultlog=${out}/webjtl>
    <jvmarg value=Dgroupthreads=/>
    </jmeter>
    <echo message=jmeter webjmx finished/>
    <antcall target=interval/>
    <antcall target=test/>
    <!ant antfile=buildxml/>
    </target>
    <target name=interval>
    <echo message=sleep seconds/>
    <sleep seconds=/>
    <echo message=continue/>
    </target>
    <target name=tfile>
    <xslt
    in=${basedir}/webjtl
    out=${basedir}/webhtml
    style=${basedir}/jmeterresultsdetailreportxsl/>
    </target>
    <target name=run depends=test/>
    </project>

[]  []  []  []  


From:http://tw.wingwit.com/Article/program/Java/ky/201311/29278.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.