我读了http://testng.org/doc/documentation-main.html#running-testng-programmatically。但我想从 testng.xml 中读取 testng 套件和类。这是我的 testng.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" verbose="1" >
<test name="Test" >
<classes>
<class name="Test1"/>
<class name="Test2"/>
</classes>
</test>
</suite>
谢谢!!!