简体   繁体   English

如何在TestNG的xml文件中添加多个文件

[英]How to add multiple files in xml file in TestNG

While creating xml file to run all java files, it is not showing all java file,在创建 xml 文件以运行所有 java 文件时,它没有显示所有 java 文件,

在此处输入图片说明

if adding file name manually then also it is not running all the java file如果手动添加文件名,那么它也不会运行所有的 java 文件

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
  <test thread-count="5" name="Test">
    <classes>
      <class name="Entry.StatusHistory"/>
      <class name="Entry.Dashboard"/>
    </classes>
  </test> <!-- Test -->
</suite> <!-- Suite -->

It is only running Entry.StatusHistory this file.它只运行Entry.StatusHistory 这个文件。 How to solve this issue?如何解决这个问题?

Please make sure that you've used testNG annotations in Dashboard class.请确保您在Dashboard类中使用了testNG注释。 As this happens when you have no test cases in your class( @test ).当您的班级中没有测试用例时会发生这种情况( @test )。 So, testNG.xml will not run that class.因此, testNG.xml不会运行该类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM