I have cucumber tests which I execute with a Junit 5 suite. The Cucumber tests are all executed, but the extensions are ignored.
The class to run the cucumber tests looks like this:
import cucumber.Extensions.TestExtension;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.platform.suite.api.SelectClasspathResource;
import org.junit.platform.suite.api.Suite;
@Suite
@SelectClasspathResource("cucumber")
@ExtendWith(TestExtension.class)
public class Junit5Runner {
}
Running this executes all my cucumber tests, but the extension is ignored. Since @ExtendWith is part of a different engine then @Suite it does not seem to be compatible. I couldn't really find anything about this topic online. Is there no way to run Cucumber tests with Junit 5 and Junit 5 extensions?
Thanks in advance