Cucumber unresolved steps not highlighted

已回答

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?

0

Could you please provide idea.log ("Help | Show Log in...") after restarting IDE?

0

That gives me almost 2 MB of text in multiple files, all with the same timestamp. Is there a way to cut it down?

0
Avatar
Permanently deleted user

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

0

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).

0
Avatar
Permanently deleted user

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 ...

0

Do you have "Substeps IntelliJ Plugin (1.1.0)" enabled in "Settings | Plugins"?

0
Avatar
Permanently deleted user

Yes, It's enabled and the version is 1.1.0

0

Please try to disable it

0
Avatar
Permanently deleted user

i don't have that plugin and i have the same issue

0

Hello Yavuz,

Is it possible to share idea.log after restarting IDE and sample project example?

0
Avatar
Permanently deleted user

I figured it out. It works now. Thanks.

0
Avatar
Permanently deleted user

 

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

 

0
Avatar
Permanently deleted user

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.

0

Is it possible to provide sample project example demonstrating the issue?

0
Avatar
Permanently deleted user
Scenario Outline: Positive Login test on the main page
Given users are on the login page
When users enter <username> and <password>
Then they should see their <firstname> on the top right corner
Examples:
| username | password | firstname |
| user | pass | username |

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:

<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java8</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>

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.

0
Avatar
Permanently deleted user

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.

0
0
Avatar
Permanently deleted user

Hi Yaroslav,

I commented in some of them and I appreciate if you let me know when you find out a solution.

0

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.

1

请先登录再写评论。