You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are the Java 8 style bindings supported with Quarkus-Cucumber?
When I try to define my StepDefs as such:
classApiStepDefs : En {
init {
Given("A GET request to the API") {
// code goes here
}
When("We execute the request to the {string} endpoint") { endpoint:String->// code goes here
}
Then("We get a blank list as a response") {
// more code here
}
}
}
The test errors out as if the stepdefs were undefined
Undefined scenarios:
classpath:com/example/features/integration/Api.feature:5 # Calling the GET the api without prior initialization returns a blank list
1 Scenarios (1 undefined)
3 Steps (2 skipped, 1 undefined)
0m0.091s
For completeness, the feature file is:
# Created by Dev at 2022-11-15Feature: An API
Details the API behaviour
Scenario: Calling the GET the api without prior initialization returns a blank listGiven A GET request to the API
When We execute the request to the "/endpoint" endpoint
Then We get a blank list as a response
Converting to the old Cucumber StepDefs format works
classApiStepDefs {
@Given("A GET request to the API")
funa_GET_request_to_the_API() {
// code
}
@When("We execute the request to the {string} endpoint")
funwe_execute_the_request_to_the_endpoint(endpoint:String) {
// code
}
@Then("We get a blank list as a response")
funwe_get_a_blank_list_as_a_response() {
// code
}
}
I would like to be able to use the lambda style though, as it does slightly reduce some boilerplate.
Are the Java 8 style bindings supported with Quarkus-Cucumber?
When I try to define my StepDefs as such:
The test errors out as if the stepdefs were undefined
For completeness, the feature file is:
and the Runner stub
The features, stepdefs and runner are all in the same package.
The text was updated successfully, but these errors were encountered: