Cucumber unresolved steps not highlighted
Answered
I have created a Maven project with Cucumber support following the instructions here. But when I create a feature file, unresolved steps are not highlighted, so when I try to create step definitions the instructions can't be followed. I've also tried creating the cucumber minimum example, and the same thing happens - unresolved steps are not recognised, so no shortcut to create the steps. What am I doing wrong?
Please sign in to leave a comment.
Could you please provide idea.log ("Help | Show Log in...") after restarting IDE?
That gives me almost 2 MB of text in multiple files, all with the same timestamp. Is there a way to cut it down?
I am having the same issue. Running the latest version of IntelliJ 2017.2.6 with Cucumber for Java plugin version 172.4343
Gherkin version 172.4343
You could upload archives to our FTP server: ftp://ftp.intellij.net/.uploads/ (anonymous login, .uploads directory has no permissions to list/download files, only for upload, so that other users will not be able to download your files).
Unfortunately I am unable to connect to the FTP server, but checking the IntelliJ log file, this is the error I see:
]ERROR - aemon.impl.PassExecutorService - Can't find bundle for base name org.jetbrains.plugins.cucumber.CucumberBundle, locale en_US
java.util.MissingResourceException: Can't find bundle for base name org.jetbrains.plugins.cucumber.CucumberBundle, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:773)
at org.jetbrains.plugins.cucumber.CucumberBundle.getBundle(CucumberBundle.java:27)
Not sure if this could be reason for not highlighting the unimplemented scenarios ...
Do you have "Substeps IntelliJ Plugin (1.1.0)" enabled in "Settings | Plugins"?
Yes, It's enabled and the version is 1.1.0
Please try to disable it
i don't have that plugin and i have the same issue
Hello Yavuz,
Is it possible to share idea.log after restarting IDE and sample project example?
I figured it out. It works now. Thanks.
Yesterday i updated to intellij 2018.3 and updated the cucumber and gherkin plugins to v183.4284.148. Now all my steps in gherkin are undefined. @Yavuz, how did you resolve your issue? TIA
My first issue was that none of the test steps were highlighted in the feature file. I made several changes on the IDE and it started to highlight the steps again. Unfortunately, I don't remember exactly what I did because I just started to use IntellJ. I remember disabling several plugins, removing the dependencies and adding them back again and restarting the IDE several times.
However, now I have another problem which the steps are highlighted even though the step definitions are already created. This happens only if I use lambda functions in the step definitions and only if the step definition has a parameter. Therefore, I cannot quick jump from the feature file to the step definitions and vice versa. For all other cases, it works fine. I made sure to update everything for Java 8 but I still have that problem. I am working on it for almost a week now but still have no solution.
Is it possible to provide sample project example demonstrating the issue?
public LoginSteps() {
// Scenario Outline: Positive Login test on the main page
Given("users are on the login page", () ->
...
);
When("users enter {word} and {word}", (String username, String password) -> {
...
});
Then("they should see their {word} on the top right corner", (String firstname) -> {
...
});
Given step in the feature file is not highlighted. I can do Ctrl+click and go to the linked step definition. However, I cannot do the same from step to the feature file. Ctrl+click does not work and "Cannot find declaration to go to" message pops up.
When and Then steps in the feature file are highlighted as they are not created in the step definitions. Ctrl+click does not work and "Cannot find declaration to go to" message pops up.
When I run the tests, it works fine. Issues are not being able to use this great feature of highlights and moving between feature files and the steps quickly.
Hope you can find a solution. I have the 2018.3 Ultimate edition, Java SDK 1.8.0_192 and the following dependencies as an addition to IntelliJ cucumber plugin:
I will very much appreciate if you can find a solution to this. I have seen several people complaining about similar issues online but no solution.
My issue got fixed. I clean uninstalled intellij, including cache, plugins, logs etc. and installed the latest version and its working like a charm. Thanks guys for help.
Yavuz,
Please follow the related issues on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-195098 , https://youtrack.jetbrains.com/issue/IDEA-144648
Hi Yaroslav,
I commented in some of them and I appreciate if you let me know when you find out a solution.
Yavuz,
Please start following them to receive automatic notifications from YouTrack when issues are updated.
See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.