TestNG based tutorial - test the level of execution order and common annotations in TestNG.xml

According testng.xml file configuration, test level suite -> test -> class -> methods.

test corresponding to the test testng.xml tag, rather than testing the class @Test.

Test class corresponding to the @Test testng.xml of methods.

 

Create a TestCase as TC3

running result

Therefore, the use @ BeforeSuite, @ BeforeTest, @ BeforeClass, @ BeforeMethod other labels,

Their actual execution sequence is suite -> test -> class -> method.

 

Guess you like

Origin www.cnblogs.com/54tester/p/11519151.html