@BeforeTest我有一个关于or之类的注释的问题@BeforeMethod。是否可以设置全局注释,以便我的所有测试类都将使用它们?我的框架中有 20 多个测试类,其中有很多测试方法。每个测试类都有类似@BeforeTest或 的先决条件@BeforeMethod,但对于每个测试类,此先决条件是相同的。所以我认为这可能是一个好主意,编写一个通用的注释方法,可以在每个测试类中使用。
@BeforeTest
@BeforeMethod
java testng annotations testng-annotation-test
annotations ×1
java ×1
testng ×1
testng-annotation-test ×1