Questions tagged [cucumber-java]

Cucumber-JVM is a pure Java implementation of Cucumber that supports the most popular programming languages for the JVM. Cucumber-JVM supports the following JVM languages: - Java - Groovy - Scala - Clojure - Jython - JRuby - Rhino JavaScript - Gosu

Cucumber is basically Ruby based. But Java can be used by using Cucumber JVM.

Running You can run it with the tool of your choice. There are several ways to run scenarios with Cucumber-JVM:

  • JUnit Runner
  • CLI Runner
  • Android Runner
  • Third party runners

Cucumber-JVM also integrates with all the popular Dependency Injection containers. For details Dependency Injection

1140 questions
2
votes
1 answer

Implement Cucumber "cucumber.api.java8.En" interface by step definition class

What is the purpose of implementing "cucumber.api.java8.En" interface by cucumber step definition classes?.
Vinee-the-Pooh
  • 835
  • 3
  • 10
  • 27
2
votes
1 answer

Intellij cucumber scenario outline undefined step definition

I've read numerous posts in Stackoverflow around similar issues but most of them related to steps from a scenario, not a scenario outline. My problem is that although Intellij generates the step definition stub for me, it doesn't recognise the step…
John J Smith
  • 11,435
  • 9
  • 53
  • 72
2
votes
1 answer

Dynamically load step definition file from jar

I have a Gherkin executor where I execute my feature files. What I would like to do would be to add a StepDefinition file from an other jar. The user would be able to use my project with the step def that I have already wrote but he would also be…
Gersi Tuzi
  • 23
  • 4
2
votes
2 answers

Cucumber Java how to update an element in a DataTable

I am trying to follow an example in the Cucumber tutorial but it is written for Ruby and I am trying to write it in Java. I am having difficulty implementing the @When step as it requires me to update the DataTable and I am getting the following…
robbie70
  • 1,515
  • 4
  • 21
  • 30
2
votes
2 answers

TestNG+Cucumber parallel tests run on same chrome instance

Whenever we run our test suite in parallel as "tests" with the TestNG xml file, it opens both instances of a chrome driver, but intermediately executes both cucumber features in the same window of chrome. Gives us some result like this: Searches…
Nanococo
  • 23
  • 1
  • 5
2
votes
1 answer

TeamCity Build Reports HTML pages not loading CSS/JS

I'm following this link to show cucumber HTML reports in a Build Report Tab. https://confluence.jetbrains.com/display/TCD18/Including+Third-Party+Reports+in+the+Build+Results In my BuildConfiguration I refer my artifacts…
Hussain Mansoor
  • 2,934
  • 2
  • 27
  • 40
2
votes
0 answers

How to fail a Cucumber Java test in IntelliJ 18.3?

I have some Cucumber-Java test suites in some of my Java projects. They're set up with JUnit 4 runners using the @RunWith annotation and the Cucumber runner. I just upgraded from IntelliJ 18.2 to 18.3 (Ultimate). In 18.2, the unit test would fail if…
Roddy of the Frozen Peas
  • 14,380
  • 9
  • 49
  • 99
2
votes
2 answers

Cucumber on JDK 11

I was trying to find out if Cucumber can still run on JDK 11. We are currently using Azul Zulu JDK 8 on one of our applications and been using Cucumber as testing tool. If not, then can I know if there are some other alternatives for for Cucumber…
marvinv
  • 181
  • 2
  • 9
2
votes
1 answer

Cucumber failed to instantiate class, steps undefined

I keep getting these errors every time I try to run my test using cucumber with selenium: cucumber.runtime.CucumberException: Failed to instantiate class br.gov.pb.receita.atfbdd.steps.arrecadacao.ConsultarLancamentoARR001 - this class doesn't have…
2
votes
2 answers

How to add a default timeout for all Cucumber steps?

I am using a Selenium-Cucumber-Java framework for automation. I need to restrict the run duration of my scenarios in such a way that max 30 mins should be taken for any scenario and fail the scenario if it takes more time than that. I found this…
SP.
  • 85
  • 3
  • 13
2
votes
1 answer

Cucumber test cases fail when run together but pass when run individually

I am using SpringBoot with Cucumber. One particular test case fails when run together and passes when run individually. Other Scenarios in the same feature file seems to work fine. I tried the following links but they did not work. link1, link2,…
Andy
  • 5,433
  • 6
  • 31
  • 38
2
votes
0 answers

Can't debug using breakpoints with Gradle in Intellij

I'm using Cucumber + Gradle in Intellij and can't figure out how to debug using breakpoints. I tried the suggestions posted by other users but none of them work for me. Has anyone figured out an easy way to do this? Below is my build.gradle…
ihossain
  • 343
  • 1
  • 8
  • 19
2
votes
3 answers

Unable to glue Cucumber Features to Step definitions

Given the following maven folder structure, for which super-flights-acceptanctests is a child of a parent module, and the following Junit runner class, what is the correct configuration? Currently any maven goal I try and use to run the tests fails…
Steerpike
  • 1,712
  • 6
  • 38
  • 71
2
votes
1 answer

How do I perform BDD test for spring application when am running the the front end using another framework (vuejs) which is running on different port

Am trying to perform BDD tests for my spring application. Am using vuejs for the front end which runs on different port. My problem is that spring application is failing to connect to the front end application(returns 404 status) Here is the code on…
Ivan
  • 759
  • 1
  • 10
  • 19
2
votes
1 answer

cucumber best practices

One of my clients is interested in using Cucumber. But I still have few questions about that: Should the dev team adapt their code to the Gherkin file? Should we start a project from scratch to follow Cucumber pattern? where should we store our…