zoukankan      html  css  js  c++  java
  • testng遇到的一些问题

    笔者最近在用testng+maven时,运行编写的xml文件时,编辑器报了一个错,如下

    报错:

    [TestNGContentHandler] [WARN] It is strongly recommended to add "<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >" at the top of your file, otherwise TestNG may fail or not work as expected.Groups1
    解决办法:

    在xml文件中,添加一句:

    <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">

    文件如下:

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
    <suite name="suitename">
        <!--运行所有类-->
        <test name="runAll">
            <classes>
                <class name="com.course.testng.groups.Groups1"></class>
                <class name="com.course.testng.groups.Groups2"></class>
                <class name="com.course.testng.groups.Groups3"></class>
            </classes>
        </test>
        <!--运行指定的分组-->
        <test name="runGroup1">
            <groups>
                <run>
                    <include name="client"></include>
                </run>
            </groups>
            <classes>
                <class name="com.course.testng.groups.Groups1"></class>
                <class name="com.course.testng.groups.Groups2"></class>
            </classes>
        </test>
    
    </suite>
  • 相关阅读:
    透过书本了解HTML5
    Seam性能讨论
    Maven依赖管理
    Tapestry
    为HTML5的未来制定学习计划
    后缀数组
    HDU 1042(大数)
    教你理解复杂的C/C++声明
    编程修养
    平衡二叉树
  • 原文地址:https://www.cnblogs.com/starstarstar/p/11313307.html
Copyright © 2011-2022 走看看