Difference between BeforeClass and BeforeTest in TestNG

后端 未结 7 2279
旧巷少年郎
旧巷少年郎 2020-11-28 05:00

As we know from official TestNG documentation:

@BeforeClass: The annotated method will be run before the first test method in the current class is invok

7条回答
  •  無奈伤痛
    2020-11-28 05:51

    My opinions:

    @BeforeClass:The annotated method will be run before the first test method in the current class is invoked

    @BeforeTest:The annotated method will be run before any test method in the current suite is run

提交回复
热议问题