-
Notifications
You must be signed in to change notification settings - Fork 149
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
Gherkin: .feature can't find a .step definition when it uses a parametertype on it #458
Comments
this is only supported on the current developed 2.x version of cucumber. |
How install the 2.0 version? |
Unable to follow this guide due to a broken link: 404 - file not found > eclipse update site for the cucumber eclipse plugin: https://cucumber.github.io/cucumber-eclipse/update-site/main/ |
This is an updatesite link not for a webbrowser, just enter it into |
at Eclipse:
Select If 1.0 was installed, it will be updated to 2,0 instead: PROBLEM! After install 2.0, the options to convert project to cucumber is absent, and .feature files are no more associated to cucumber: I tried to install 2.0 after 1.0 to upgrade it, but the issue remains, and I couldn't associate .feature to cucumber properly: Steps: At Project, select it with right click and Now the feature and steps are correctly linked. [ONLY WORKED WITH 1.0 BUT NOT COMPATIBLE WITH CUCUMBER 6/7 NEW FEATURES LIKE PARAMETER TYPE, UNABLE TO DO IT WITH 2.0 DUE TO PREVIOUSLY ISSUES] |
2.0 do not use/require a special project type anymore. Please make sure that 1.0 is uninstalled and there are no conflicting editor assignments that take precedence. |
Also make sure to use a recent eclipse version. |
Using the last version, and already installed 2.0 alone, the issue remains. |
There is an example project here: https://github.com/cucumber/cucumber-eclipse/tree/main/examples/java-calculator this requires m2eclipse to be imported and then should work at least last time i tested, if not please open an issue with the steps to reproduce the problem. |
Sorry I don't understand, your screenshot shows the green cucumber icon for the feature and it open a gherking / cucumber editor with highligts and instant run actions so what exactly are you missing? |
How to install Plugin properly details at: #459 |
After know how to install Cucumber Eclipse Plugin 2.0, and now able to test a cucumber project that uses Parameter type, the feature remains unable to find the step definition: Updating the example calculator code to support parametertype: Looking at these files:
And updating the step code at line 19:
ISSUE |
According to your screenshot you have not saved the RnpCalculatorStep file... Beside that its best to enhance the example (or copy it, provide an own, ...) open a PR and a separate issue. |
You want me to update the example code in github, that's it? Close this issue and open a new one? |
New issue opened: #460 |
👓 What did you see?
The .feature file (the gherkin) cant find the step definition when it's using a @parametertype value on it.
Files content
.feature
Feature: Pages
I want to use the menu page
Scenario: Click on menu
Given I click on menu
.step
@then("I click on {menu}")
@ParameterType("menuitema|menuitemb|menuitemc")
public String menu(String menu) {
if ("menuitema|menuitemb|menuitemc".contains(menu)) {
return menu;
}
return "";
}
✅ What did you expect to see?
The Gherkin should find the step definition, and the step definition should found the parameter type definition, this way we can CTRL + CLICK on feature to goes to the step definition.
📦 Which tool/library version are you using?
Eclipse + Eclipse Cucumber Plugin
🔬 How could we reproduce it?
Steps to reproduce the behavior:
📚 Any additional context?
Parameter Type: https://cucumber.io/docs/cucumber/configuration/?sbsearch=Parameter%20type
Cucumber Expressions: Parameter type (https://cucumber.io/blog/open-source/announcing-cucumber-expressions/?sbsearch=parameter%20type)
This text was originally generated from a template, then edited by hand. You can modify the template here.
The text was updated successfully, but these errors were encountered: