DbExtension
我所有的数据库测试都使用自定义扩展进行了注释。我还想标记这些测试,以便我可以在 CI 中单独运行它们。有什么我可以在扩展类上添加的,以便标记所有扩展测试吗?
只是为了说明(在 kotlin 中):
class DatabaseExtension : ParameterResolver, AfterEachCallback {
//setup connection
}
@ExtendWith(DatabaseExtension::class)
@Tag("db) //Can we have this tag in the extension class instead of each test
class MyDbTest {
}