📅  最后修改于: 2021-01-11 11:57:34             🧑  作者: Mango
TestNG注释是一段代码,它被插入程序或业务逻辑内部,用于控制测试方法的执行流程。
TestNG Annotation | Description |
---|---|
@BeforeSuite | The @BeforeSuite annotated method will run before the execution of all the test methods in the suite. |
@AfterSuite | The @AfterSuite annotated method will run after the execution of all the test methods in the suite. |
@BeforeTest | The @BeforeTest annotated method will be executed before the execution of all the test methods of available classes belonging to that |
@AfterTest | The @AfterTest annotated method will be executed after the execution of all the test methods of available classes belonging to that |
@BeforeClass | The @BeforeClass annotated method will be executed before the first method of the current class is invoked. |
@AfterClass | The @AfterClass annotated method will be invoked after the execution of all the test methods of the current class. |
@BeforeMethod | The @BeforeMethod annotated method will be executed before each test method will run. |
@AfterMethod | The @AfterMethod annotated method will run after the execution of each test method. |
@BeforeGroups | The @BeforeGroups annotated method run only once for a group before the execution of all test cases belonging to that group. |
@AfterGroups | The @AfterGroups annotated method run only once for a group after the execution of all test cases belonging to that group. |