Closed maioni closed 2 years ago
3. 'Eclipse Cucumber Plugin' version '1.0.0.202106240526'
this is only supported on the current developed 2.x version of cucumber.
- 'Eclipse Cucumber Plugin' version '1.0.0.202106240526'
this is only supported on the current developed 2.x version of cucumber.
How install the 2.0 version?
See https://github.com/cucumber/cucumber-eclipse#follow-the-latest-snapshot
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/
Unable to follow this guide due to a broken link
This is an updatesite link not for a webbrowser, just enter it into Help>Install new Software
at Eclipse: Help > Install New Software
Add
Name
: Cucumber Eclipse Plugin 2.0
Location
: https://cucumber.github.io/cucumber-eclipse/update-site/main/
Add
Select Cucumber Eclipse Plugin
, Ansi Console
, third party dependencies
Next
If 1.0 was installed, it will be updated to 2,0 instead:
Select All
Trust Selected
Restart Now
PROBLEM! After install 2.0, the options to convert project to cucumber is absent, and .feature files are no more associated to cucumber: @laeubi
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:
Install Cucumber Eclipse Plugin 1.0
Restart Eclipse
At Project, select it with right click and Configure
> Convert to Cucumber Project...
[OPTION ABSENT WITH 2.0, ONLY AVAILABLE WITH 1.0]
Select Project
and Clean...
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]
PROBLEM! After install 2.0, the options to convert project to cucumber is absent,
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.
PROBLEM! After install 2.0, the options to convert project to cucumber is absent,
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.
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.
Downloaded a new and updated Eclipse with already m2 installed:
But the issue remains, after install Cucumber Eclipse Plugin, the files .feature remains not associated, and the Convert project to cucumber absent.
Same issue with the example project:
@laeubi the issue is open: https://github.com/cucumber/cucumber-eclipse/issues/459
Same issue with the example project:
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: https://github.com/cucumber/cucumber-eclipse/issues/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: Original code: https://github.com/cucumber/cucumber-eclipse/tree/main/examples/java-calculator Updated code with parametertype implemented: java-calculator.zip
Looking at these files:
And updating the step code at line 19:
From:
@Given("a calculator I just turned on")
public void a_calculator_I_just_turned_on() {
calc = new RpnCalculator();
}
To:
import io.cucumber.java.ParameterType;
...
@Given("a calculator I just turned {power}") public void a_calculator_I_just_turned_on(String power) { switch (power) { case "on": calc = new RpnCalculator(); break; } }
@ParameterType("on|off")
public String menu(String power) {
if ("on|off".contains(power)) {
return power;
}
return "";
}
![image](https://user-images.githubusercontent.com/6604846/173973356-14f7517e-1ca2-40de-9a9a-2af4fbe042a4.png)
**ISSUE**
1. When we try to HOLD LEFT CTRL key and do a mouse CLICK on line 9:
![image](https://user-images.githubusercontent.com/6604846/173974184-9da6d117-e8e7-44a4-a2ca-3edea04e37c7.png)
2. It can't find the step definition:
![image](https://user-images.githubusercontent.com/6604846/173974237-cc4e3278-8903-4b6b-9ae9-4883c7519207.png)
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.
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: https://github.com/cucumber/cucumber-eclipse/issues/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.