-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide multiple annotations support for Cucumber-JVM #1341
Comments
Hi @priyasetty, Cucumber does not distinguish between the keyword used ( Perhaps I'm not understanding your question correctly; in which case, could you please provide some more information? (for instance your feature file?) |
@mpkorstanje pointed out I had misunderstood your question. You mean you want to use multiple annotations on one step definition, i.e. to have multiple regex match to that step def. Using repeating annotations is a Java 8 feature, while afaik Cucumber-jvm is still on Java 7. This feature would need Java 1.8; the main hurdle there is we don't know how well Android supports it and we currently have nobody that knows Android. In the mean time, as a workaround you could try using your annotations with different keywords ( |
This looks like a duplicate of #957. |
Yup @mlvandijk , currently I can use max of 5 different matches per step def and unfortunately the step file looks awkward, so fixing this shall help us if I put Then keyword or any same keyword multiple times for different matches Duplicate annotation. The declaration of 'cucumber.api.java.en.Then' does not have a valid java.lang.annotation.Repeatable annotation. |
any ETA to fix this? |
You're welcome to help out. I reckon the best place to start would be:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Provide multiple annotations support for Cucumber-JVM
Expected Behavior
@and("^the response body tag "(.)" contains the following values:$")
@then("^the response body attribute "(.)" contains the following values:$")
@then("^the response body XPath"(.*)" contains the following values:$")
Current Behavior
we get below error if we use same annotation and if we change the annotation and use the step then we get undefined step.
java: cucumber.api.java.en.Then is not a repeatable annotation type
Possible Solution
we need these multiple annotations with same code logic as while reading the gherkin it makes more sense for PO's and other stake holders.
Note : Specflow supports multiple annotations
Your Environment
below is the cucumber version that i'm using in my project.
The text was updated successfully, but these errors were encountered: