【问题标题】:Skipped result xml file on testNG Suite跳过 testNG Suite 上的结果 xml 文件
【发布时间】:2016-05-21 10:41:22
【问题描述】:

我在 Eclipse 中使用 Java 中的 TestNG 框架创建了一个测试,并希望通过 testNG 套件运行 XML 文件来执行我的测试。

我的文件夹的文件系统如以下链接截图所示: 1

我的 java 代码:

package a;

import org.testng.annotations.Test;

public class Amir {
	
        @Test
	public static void main(String[] args) {
		// TODO Auto-generated method stub
						
		System.out.println("Test Test"); 			
			
		}	

}

我的 xml 代码:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
  <test name="Test">
    <classes>
      <class name="a.Amir"/>
    </classes>
  </test> <!-- Test -->
</suite> <!-- Suite -->

当我使用 TestNg Suit 执行上述 xml 时,在 Eclipse 控制台上我收到的日志为:

[TestNG] 运行: C:\Users\Amir\workspace\SmartAir.co.il\testng.xml

================================================

套房

运行的测试总数:1,失败:0,跳过:1

================================================

有人可以帮我解决这个问题吗?

【问题讨论】:

  • 能否将详细级别 10 添加到您的 xml 文件(在套件标记中)并将输出粘贴到此处?

标签: java xml eclipse selenium testng


【解决方案1】:

我找到了答案:我必须删除 (String[] args),因为 TestNG 测试不接受任何参数。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-08
    • 1970-01-01
    • 2017-06-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多