testng几种写法
testng几种写法:
1 <!--运行-类--> 2 <?xml version="1.0" encoding="UTF-8"?> 3 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> 4 <suite name="Suite"> 5 <test name="classTest"> 6 <classes> 7 <class name="admin.jobDictionary" /><!--admin是包的名字--> 8 <class name="admin.Message" /> 9 </classes> 10 </test> 11 </suite>
<!--运行-包--> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Suite"> <test name="packageTest"> <packages> <package name="student" /> <package name="admin" /> </packages> </test> </suite>
<!--运行-类中方法--> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Suite"> <test name="methodTest"> <classes> <class name="student.feedback"><!--包名.类名--> <methods> <include name="feedbackTestNG" /><!--方法名--> </methods> </class> </classes> </test> </suite>