karatelabs / karate

Test Automation Made Simple

Home Page:https://karatelabs.github.io/karate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IDE Errors Using Eclipse

NuttBoxer opened this issue · comments

Using Eclipse, and the specified Cucumber Eclipse Plugin, I'm seeing errors such as "... does not have matching glue code". If there's additional setup, or dependencies needed to run Karate in Eclipse, they seem to be missing from the setup instructions.

These errors do not prevent the tests from running successfully.

Cucumber Eclipse Feature 0.0.17.201704062133 cucumber.eclipse.feature.feature.group null
Version: Neon.3 Release (4.6.3)
Maven project was setup using the archtype quick start method
screen shot 2017-06-14 at 3 58 07 pm

try this.

Eclipse --> Preferences --> Cucumber --> User Settings

In the text-field for "Add Root Package Name .." enter com.intuit.karate

In some cases, even this does not work. Then go to the "Run Configuration" for the feature you were attempting to run and use com.intuit.karate instead of classpath: for the 'Glue'.

The first part above is in the Cucumber Eclipse Plugin doc. The second is a mystery. Let me know if this works.

Thanks for the reply Peter! adding com.intuit.karate, then restarting Eclipse seems to have fixed my issue. I will add this to our project readme, a bit embarrassed I didn't find it myself.

great ! thanks for the update.

Somewhat similar to "NuttBoxer", but I am seeing different error messages in Eclipse Mars 4.5.2 that does not prevent me from executing the .feature files, but they are extremely annoying. I tested this using both Maven and Gradle and this does not appear on Intellij, its a Eclipse specific issue. I tried the above solution but i do NOT see a "user setting" in the Cucumber option. Screenshot attached.
any ideas?

eclipse mars error messages

Do you have the cucumber plugin installed?
https://github.com/cucumber/cucumber-eclipse

are you sure you are using the "official" cucumber eclipse plugin, there are a couple of other non-official plugins in the eclipse marketplace etc.

when I searched for "cucumber" in the eclipse marketplace, the only result that returned was a plugin called, "Natural" 0.7.6. It said it supported Cucumber, Jebahve, etc. I am guessing that is not the "official" plugin. what would it be called on the Eclipse marketplace?

I couldn't find it in the marketplace. The above link works.

yes. ignore the marketplace, install from the link.

I am so used to installing from the marketplace. Thank you both, the error messages went away after installing the correct plugin.

@ptrthomas I am facing still this error. "required (...)+ loop did not match anything at input 'Scenario:'" installed cucumber plugin.
Screenshot 2020-05-11 at 8 51 22 PM

@Lingeshs if you can't figure this out from all the above comments and the link below, take it up with the plugin developers please. we are focused on the VS Code IDE support: https://github.com/intuit/karate/wiki/IDE-Support