如何将多个testNG文件分组到一个testng文件中

时间:2017-02-17 21:57:00

标签: testng

我有来自不同项目的多个testNG文件。如下所示,

Project1: AA/BB/projectA/test.xml 
Project2: AA/BB/projectB/test.xml
Project3: AA/BB/projectC/test.xml

How do i group all these three files into a one single testng file.
like

<run>
AA/BB/projectA/test.xml 
AA/BB/projectB/test.xml
AA/BB/projectC/test.xml
</run>

1 个答案:

答案 0 :(得分:0)

“您可以创建父XML文件并调用父文件中的所有文件”

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Parent XML File">
    <suite-files>
      <suite-file path="AA/BB/projectA/test.xml" />   
      <suite-file path="AA/BB/projectB/test.xml" />
      <suite-file path="AA/BB/projectC/test.xml" />   
    </suite-files>
</suite>