zoukankan      html  css  js  c++  java
  • testNg-build.xml

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <project basedir="." default="run" name="Demo">
        <property name="src" value="${basedir}src" />
        <property name="bin" value="${basedir}in" />
        <property name="lib" value="${basedir}libs" />
        <property name="report" value="${basedir} est-output" />
        <property name="suite" value="${basedir}" />
        <property name="debuglevel" value="source,lines,vars" />
     
        <tstamp>
            <format property="nowstamp" pattern="yyyyMMdd-HHmmss" locale="en" />
        </tstamp>
     
        <path id="classpath">
            <pathelement location="." />
            <pathelement location="${bin}" />
            <fileset dir="${lib}/">
                <include name="**/*.jar" />
            </fileset>
        </path>
     
        <path id="sourcepath">
            <pathelement location="./src" />
        </path>
     
        <target name="clean">
            <delete dir="${bin}" failonerror="No" />
            <mkdir dir="${bin}" />
        </target>
     
        <target depends="clean" name="build">
            <javac srcdir="${src}" debug="true" sourcepathref="sourcepath" debuglevel="${debuglevel}" destdir="${bin}">
     
                <classpath refid="classpath" />
     
            </javac>
        </target>
     
        <taskdef resource="testngtasks" classpath="${lib}/testng-6.8.5.jar" />
        <target name="run" depends="build">
            <testng classpathref="classpath" outputdir="${report}/${nowstamp}" failureproperty="test.failed">
                <!--xml test suite file -->
                <xmlfileset dir="${suite}">
                    <include name="adminTestNG.xml" />
                </xmlfileset>
            </testng>
     
            <xslt in="${report}/${nowstamp}/testng-results.xml" style="${report}/tool/testng-results.xsl" out="${report}/${nowstamp}/indexNew.html">
     
                <!-- you need to specify the directory here again -->
     
                <param name="testNgXslt.outputDir" expression="${report}/${nowstamp}/" />
     
                <classpath refid="classpath" />
            </xslt>
     
            <fail message="ERROR: One or more tests failed! Check test reports " if="test.failed" />
     
        </target>
     

    </project>



  • 相关阅读:
    [THUWC2017]在美妙的数学王国中畅游 LCT+泰勒展开+求导
    luoguP4238 【模板】多项式求逆
    Bzoj 2502: 清理雪道 有上下界网络流_最小流
    [十二省联考2019]字符串问题 后缀自动机 + 拓扑排序 + 最长路 + 倍增
    luogu P5290 [十二省联考2019]春节十二响 优先队列 + 启发式合并
    bzoj 2648: SJY摆棋子 KDtree + 替罪羊式重构
    os模块,sys模块
    datetime模块,random模块
    终端打印覆盖打印,让加载界面更加好看
    time模块
  • 原文地址:https://www.cnblogs.com/xxyBlogs/p/6151785.html
Copyright © 2011-2022 走看看