简体   繁体   English

如何忽略 quarkus 测试

[英]How to ignore a quarkus test

I am testing my Quarkus application, and I would like to ignore some of my tests.我正在测试我的 Quarkus 应用程序,我想忽略我的一些测试。

The test class is annotated with @io.quarkus.test.junit.QuarkusTest , and each method with @org.junit.jupiter.api.Test测试 class 用@io.quarkus.test.junit.QuarkusTest注释,每个方法用@org.junit.jupiter.api.Test

I'm trying to use the @org.junit.Ignore annotation, but it's not working, the ignored tests are executed anyway.我正在尝试使用@org.junit.Ignore注释,但它不起作用,无论如何都会执行忽略的测试。

This is the code:这是代码:

@QuarkusTest
@TestHTTPEndpoint(MyResource::class)
class MyResourceTest {

    @Test
    @Ignore
    fun `to be ignored`() {
        assertTrue(false)
    }
}

Does anyone know how can I achieve this?有谁知道我怎样才能做到这一点?

You can use @Disabled annotation您可以使用@Disabled注释

You can also conditionally run tests with assumptions .您还可以有条件地运行带有假设的测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM