【发布时间】:2019-04-15 08:58:22
【问题描述】:
我所有的数据库测试都使用自定义 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 {
}
【问题讨论】:
标签: junit5 junit5-extension-model