Search code examples
automated-testscucumbergraphqlbddkarate

Karate GraphQL test - Does not have matching glue in Eclipse?


I am insanely new so forgive me first but I have spent tons of time already researching and playing here how to do some kind of API testing using Karate or Cucumber for our GraphQL tests. I have experience with Cucumber using Ruby but that was REST API's and we are using GraphQL so I think it needs to be changed. I have tried using Karate now in Eclipse and using the examples from here: https://github.com/intuit/karate/tree/master/karate-demo/src/test/java/demo/graphql. I thought there needed to not be any step defs with Karate so I am unsure why when just copying/pasting the examples I am getting errors in Eclipse stating the steps do not have matching glue code.

My folder structure is very simple so maybe I am missing something, again, I'm SUPER new so just trying to get some help. If only they chose to go with REST I'd be back with Cucumber. If anyone has a suggestion or maybe a better route to test the GraphQL API's another way I'd be happy to take a suggestion for automating this.

Error

Folder Structure

Thank you so much for any help.


Solution

  • I'm pretty sure your problem is solved if you use the right Cucumber plugin for Eclipse.

    Just look at the information in this ticket and you should be up and running !: https://github.com/intuit/karate/issues/90