Quarkus Cucumber

This extension allows you to use Cucumber to test your Quarkus application.

Installation

If you want to use this extension, you need to add the io.quarkiverse.cucumber:quarkus-cucumber extension first. In your pom.xml file, add:

<dependency>
    <groupId>io.quarkiverse.cucumber</groupId>
    <artifactId>quarkus-cucumber</artifactId>
    <version>1.0.0</version>
</dependency>

Usage

To bootstrap Cucumber add the following class to your test suite:

import io.quarkiverse.cucumber.CucumberQuarkusTest;

public class MyTest extends CucumberQuarkusTest {

}

This will automatically bootstrap Cucumber, and discover any .feature files and step classes that provide glue code.

IDE Integration

The test class can by run by any IDE with support for JUnit5.

In IntelliJ it is possible to directly run feature files:

run cucumber inside intellij

You need to add the following main method to your test class:

import io.quarkiverse.cucumber.CucumberQuarkusTest;

public class MyTest extends CucumberQuarkusTest {
    public static void main(String[] args) {
        runMain(MyTest.class, args);
    }
}