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
33
votes
1 answer

what is the difference between io.cucumber and info.cukes

I am trying to integrate BDD using Cucumber. But I am really confused what is the difference between io.cucumber and info.cukes libraries. And which one to use and when. I tried to read and understand the github README.md file still can't make heads…
Alok
  • 1,441
  • 4
  • 20
  • 31
23
votes
3 answers

Running Cucumber tests directly from executable jar

I have a project with cucumber and maven also I am using the JUnit. I am able to run and build my project successfully from Eclipse. Now I want to run the test from command line in another system which does(should) not have eclipse or cucumber…
Arpan Buch
  • 1,380
  • 5
  • 19
  • 41
13
votes
3 answers

java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible:module

This is my first cucumber project and i followed a tutorial when setting everything up. It all seems to be the same but for some reason i get this: java.lang.ExceptionInInitializerError. Caused by: java.lang.reflect.InaccessibleObjectException:…
Ortero
  • 243
  • 2
  • 3
  • 12
12
votes
2 answers

Cucumber `--tags` options from command line?

What i would like to do is to pass cucumber options from command line to execute scenarios with tag name @extecuteThese but also i wanted to exclude scenarios that are with tag name @WIP so what am i doing so far is -Dcucumber.options='--tags…
Ranjith's
  • 4,508
  • 5
  • 24
  • 40
11
votes
4 answers

How do I run specific scenario in cucumber

How to run specific scenario in cucumber out of multiple scenario? Feature file Feature: Test Test Smoke scenario Scenario: Test login with valid credentials Given open firefox and start application jhbhhjhj When I click on Login And enter…
Rakesh kumar
  • 157
  • 2
  • 3
  • 9
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
2 answers

How to write a custom Failure message for the Failed Step in Cucumber-java in extentReports

I want to write custom failure message in my Cucumber ExtentReports. Tool using : Cucumber Java Selenium JUnit ExtentReports What's happening now: I have a cucumber scenario. Given something When I do something Then this step fails The failed…
Sakshi Singla
  • 2,462
  • 1
  • 18
  • 34
9
votes
1 answer

How to pass an array of Integers from Cucumber features file to step definition while writing unit test cases

I am learning Cucumber for unit testing and was trying to write unit tests for the Radix Sort code. But I am unable to figure out how to provide array of integers as an input to radix sort code from feature file. I tried providing below input: …
9
votes
4 answers

Is it possible to pass Java-Enum as argument from cucumber feature file

I am currently using selenium with Java,And want to implement cucumber to make test script more readable. Currently facing issue while passing argument to java method where Enum is expected as parameter. I would also like to know if there are any…
Devang
  • 365
  • 2
  • 6
  • 26
9
votes
2 answers

Always getting exception "Wrong type at constant pool index" with Cucumber-Java8

I am trying to set-up an example project for the Java8 dialect of Cucumber. My problem is, that I don't get it running. I always get the following hierarchy of exceptions: Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.068 sec <<<…
Matthias Wimmer
  • 3,789
  • 2
  • 22
  • 41
8
votes
1 answer

Maven Surefire plugin did not rerun failed Cucumber tests

I am using the Java implementation of Selenium WebDriver (version 2.53.0) to run some automated tests against a web application. The tests are written in Behaviour Driven Testing format using the Java implementation of Cucumber (version 1.2.3). I…
8
votes
2 answers

Using Cucumber with IntelliJ

Does anyone knows why 'Cucumber Java' does not appear in "Edit Configurations -> Defaults -> ???? even though my pom file as downloaded the dependency i.e. cucumber-java (1.1.5)
Toks
  • 83
  • 1
  • 1
  • 4
7
votes
3 answers

Is additional context configuration required when upgrading cucumber-jvm from version 4 to version 6?

I am using cucumber-jvm to perform some functional tests in Kotlin. I have the standard empty runner class: @RunWith(Cucumber::class) @CucumberOptions(features=[foo], glue=[bar], plugin=[baz], strict=true, monochrome=true) class…
sam.flahive
  • 109
  • 1
  • 1
  • 4
7
votes
2 answers

net.masterthought.cucumber.ValidationException: No report file was added

Report is not getting generated When i am using cucumber-maven reporting plugin see image here
vasudev.p
  • 437
  • 1
  • 4
  • 10
1
2 3
75 76