Questions tagged [cucumber-jvm]

Cucumber-JVM is a Cucumber implementation for the most popular JVM languages. Cucumber-JVM currently supports Java. There are also implementations for the following JVM languages, but as of version 2.1.0, they are unsupported: Groovy Scala Clojure Jython JRuby Rhino JavaScript Gosu

Cucumber-jvm is a Java-based tool for behavior-driven development.

Cucumber-JVM is a pure Java implementation of Cucumber, with native support for the most popular JVM languages: Java, Scala, Groovy, Clojure, Rhino, Jython and JRuby.

Cucumber-JVM is the successor of Cuke4Duke, which was the Ruby implementation of Cucumber, running on JRuby. It is faster and also easier to run than its predecessor.

See GitHub project

1356 questions
12
votes
3 answers

How to run the cucumber test using gradle

I'm having trouble running Cucumber tests in Gradle. I am using cucumber-jvm. Class TestNGCucumberRunner extends the AbstractTestNGCucumberTests and testng annotations with @beforesuite, @aftersuite.. I usually run the TestNGCucumberRunner.java in…
user3350712
  • 179
  • 1
  • 4
  • 14
11
votes
6 answers

How to execute cucumber feature file parallel

I have below feature files (Separate feature files) in src/test/resources/feature/ and I would like to run them in parallel. Like: One feature file has to execute in chrome and another one has to execute in firefox as mentioned @Tags name. Feature:…
ArrchanaMohan
  • 2,314
  • 4
  • 36
  • 84
11
votes
2 answers

Cucumber-JVM considers all (@Given, @When, @Then) annotations to be interchangeable

It has come (quite brutally) to my attention that with cucumber-JVM, when you define features whose steps have seemingly identical names they are considered interchangeable. Given Feature: Grab that cash with both hands and make a stash Scenario:…
Ar3s
  • 2,237
  • 2
  • 25
  • 47
11
votes
3 answers

How to run cucumber-jvm tests with maven

How do I run the cucumber tests that I have in the following locations with Maven. Source folders 'src/main/java' and 'src/main/resources' include step definitions and feature files in package 'com.testing.TestProject.login' created in each source…
11
votes
6 answers

Rerunning failed cucumber tests using cucumber-jvm

I have a Cucumber-JVM, JUnit, Selenium setup. I initiate the run by running RunSmokeTests.java using JUnit within Eclipse. I have also set up a maven profile to run the tests from command line, and possibly Jenkins in the future. When the tests are…
shreyansp
  • 723
  • 1
  • 7
  • 16
11
votes
2 answers

ignoring features in cucumber-jvm

I know you can specify tags for features and then ignore them when running cucumber on the command line. But I'm using cucumber-jvm and running it from maven. @ignore doesn't work and I wouldn't know how to pass the to-be-ignored tags to the runner…
Cpt. Senkfuss
  • 1,347
  • 3
  • 12
  • 20
11
votes
5 answers

How to install Cucumber-JVM on Eclipse

I have searched all over the internet but a newbie on java I cant figure out how to simply install Cucumber-jvm on Eclipse. What files do I need to download? I already installed Eclipse. What do I need to do to get Cucumber-JVM on Eclipse?
Ibexy I
  • 1,123
  • 6
  • 16
  • 29
11
votes
5 answers

Specify the feature file location in cucumber

I have created some cucumber test steps and a small Cucumber test case, which I run with JUnit like so: @RunWith(Cucumber.class) public class FuelCarTest { //executs cucumber steps in the class FuelCarSteps } The Cucumber features files are…
lanoxx
  • 12,249
  • 13
  • 87
  • 142
10
votes
8 answers

Extracting Cucumber Step name at runtime

I am trying to find out if there is an option to figure out the cucumber step currently getting executed, I am trying to perform certain action depending on the step name. I can see StepDefinitionMatch class gets the steps, but I am not sure how can…
user3000021
  • 288
  • 2
  • 3
  • 12
10
votes
6 answers

Katalon - export recorded test script to java/junit

Is there an option to export recorded test script to Java/JUuit(similar to slenium IDE) in Katalon studio? Because the application I'm working on is compatible only with IE; so I couldn't use selenuim IDE. so I'm forced to find someother tools to…
10
votes
1 answer

Cucumber-jvm Hooks when Scenario is passed or failed

In Jbehave we can execute method upon outcome of scenario success/failure. One of the below mentioned methods will execute after failure and success. @AfterScenario(uponOutcome=AfterScenario.Outcome.SUCCESS) public void afterSuccessfulScenario()…
vkrams
  • 7,267
  • 17
  • 79
  • 129
10
votes
1 answer

How to run Cucumber with OR AND Multiple tags

I have cucumber scenarios with examples. Examples are split into using multiple tags like below: Feature: ... Scenario Outline: ... ... @Admin @INT Examples: ... @Admin @EXT Examples: ... @User…
Bala
  • 11,068
  • 19
  • 67
  • 120
10
votes
4 answers

How to call a step from another step in Cucumber-JVM

In Cucumber (the ruby version) you can easily call steps from other steps and thus build hierarchical libraries of steps making it easy to write the Gherkin feature specifications in the most generic terms. However it is not readily apparent how to…
Eric Hartford
  • 16,464
  • 4
  • 33
  • 50
10
votes
4 answers

How do I create a Cucumber DataTable?

I want to manually set up a Cucumber DataTable using Java (instead of Gherkin). In Gherkin, my table would look like this: | h1 | h2 | | v1 | v2 | My Java so far looks like this: List raw = Arrays.asList( "v1", "v2"); DataTable dataTable =…
Christian
  • 6,070
  • 11
  • 53
  • 103
10
votes
2 answers

How to get a HTML table row with Capybara

I am trying to scan rows in a HTML table using partial href xpath and perform further tests with that row's other column values.
Bala
  • 11,068
  • 19
  • 67
  • 120
1 2
3
90 91
link 29 33 485