栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

如何在詹金斯上运行TestNG测试

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何在詹金斯上运行TestNG测试

如上所述,请使用以下ant脚本运行TestNG单元测试。请调整以下代码以满足您的要求。

<?xml version="1.0" encoding="UTF-8" standalone="no"?><project basedir="." default="build" name="Ant Play">    <property name="classes.dir" value="bin" />    <property name="report.dir" value="test-output" />    <path id="classpath">        <fileset dir="lib"> <include name="***.java"/> </fileset>        </copy>    </target>    <target name="clean">        <delete dir="${classes.dir}"/>    </target>    <target depends="clean" name="cleanall"/>    <target depends="build-project" name="build"/>    <target depends="init" name="build-project">        <echo message="${ant.project.name}: ${ant.file}"/>        <javac debug="true" includeantruntime="false" destdir="${classes.dir}"> <src path="src"/> <classpath refid="classpath"/>        </javac>    </target>    <target  depends="build" name="runTests" description="Running tests" >        <echo>Running Tests...</echo>        <taskdef resource="testngtasks" classpathref="classpath"/>        <testng outputDir="${report.dir}" haltonfailure="true" useDefaultListeners="false" listeners="org.uncommons.reportng.HTMLReporter" classpathref="classpath"> <xmlfileset dir="${basedir}" includes="testng.xml"/> <!--<classfileset dir="${classes.dir}" includes="**/*.class" />-->        </testng>    </target></project>

如果您遇到任何问题,请告诉我。顺便说一句,请使用Jenkins ant插件/任务运行此脚本



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/383461.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号