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
6
votes
5 answers

Cucumber 1.2.4 not finding step definitions: "You can implement missing steps with the snippets below" (2016)

I'm trying to run Cucumber with Maven on a UNIX-like (unfortunately I'm forced to use Windows, though cmd.exe has the same results) command line: mvn clean test…
JaneGoodall
  • 1,478
  • 2
  • 15
  • 22
6
votes
1 answer

IntelliJ - Cucumber step definition case

Ever since I upgraded to latest community edition of IntelliJ 15.0.3, whenever I auto generate a step definition from the feature definition file using alt + enter, it creates the method in camel case rather than usual style with underscores. For…
RandomQuestion
  • 6,778
  • 17
  • 61
  • 97
5
votes
2 answers

What is the unit of duration in cucumber report json file?

Can anyone tell me what is the unit of duration, found inside step.result captured inside cucumber reporting json? Is it millisecond, microsecond, nanosecond or anything else?
Surodip
  • 457
  • 1
  • 8
  • 21
5
votes
3 answers

regular expression with cucumber doesn't match the string giving error but would match the same string if the test is written more than once

I'm writing in java and using cucumber with eclipse to search for an IP-like string with the following requirements should accept four-digit sequences separated by periods where a digit sequence is defined as follows: Any single digit, Any…
A.Mahmoud
  • 65
  • 7
5
votes
2 answers

Cucumber : How to read examples from external excel file for Scenarios Outline

My requirement is to read examples from external excel file rather than hard code it into feature file. I have more than 100 examples which is difficult to maintain in feature file. Can you please help me on this. Here is my scenario - Scenario…
AniSaw
  • 203
  • 4
  • 10
5
votes
1 answer

how to re run failed test using jvm-cucumber-parallel-plugin

I am using jvm cucumber parallel plugin and want to re-run my failed test cases. What changes are required to make in .pom file. com.github.temyers
bugCracker
  • 3,656
  • 9
  • 37
  • 58
5
votes
1 answer

How to convert a HashMap to cucumber dataTable?

I want to know if there is any way to convert a HashMap to a DataTable in java Cucumber. I tried doing some googling and saw that the reverse is possible. Any idea on how to implement this? Thanks in advance.
5
votes
0 answers

Logging while running cucumber tests

How could I get the log statements which are written in the spring application while running the cucumber test? I am getting the logs written in the step definitions, but I am not getting the logs from actual code. Thanks in advance.
Eldhose
  • 163
  • 2
  • 4
5
votes
2 answers

Running Cucumber project using Main.run from another main method

I am new to Cucumber and trying to solve simple issue: I have created a Java Project and referred all the cucumber related jars to the build-path of this project (called it "CukeTest4") and below is the structure showing the java file and feature…
user578219
  • 597
  • 2
  • 9
  • 32
5
votes
1 answer

Java - Gherkin & Cucumber: Pass an object or list of objects on a vertical table instead of horizontal

I have the following sample gherkin scenario on my feature file: Scenario: Book an FX Trade Given trades with the following details are created: |buyCcy |sellCcy |amount |date | |EUR |USD |12345.67 |23-11-2017 | |GBP |EUR…
iamkenos
  • 1,446
  • 8
  • 24
  • 49
5
votes
2 answers

How to run cucumber feature file from java code not from JUnit Runner

I want to run cucumber feature file from java code. currently we are running form JUnit Runner package com.compareglobalgroup.testscript; import cucumber.api.CucumberOptions; import cucumber.api.testng.AbstractTestNGCucumberTests; …
bugCracker
  • 3,656
  • 9
  • 37
  • 58
5
votes
1 answer

Cucumber test for Spring Boot can run in "mvn test" but not in "mvn verify"

Summary: I am running some tests using Cucumber against a Spring Boot application. My Cucumber test are running fine when I execute them using "mvn test" but fails when I execute them in the "mvn verify" lifecycle. Details: My Cucumber runner class…
feicipet
  • 934
  • 2
  • 8
  • 21
5
votes
2 answers

How to use something like a doc string in Scenario outline in Gherkin?

I am doing a simple rest api test in Cucumber Java. The response is in Json format. The gherkin feature file i write looks like: Scenario: Given I query service by "employees" When I make the rest call Then response should contain: …
user1559625
  • 2,583
  • 5
  • 37
  • 75
4
votes
0 answers

Wanted but not invoked: navController.navigate(); Actually, there were zero interactions with this mock

I'm facing this error while navigating to other fragment. I want to test if particular fragment is navigating to correct fragment or not. How Can it be possible can anyone help me. Thanks fun matchIntendedDestination(id: Int) { val idCapture =…
4
votes
2 answers

Cucumber With JUnit java.lang.ExceptionInInitializerError

I'm new to the UnitTesting and Cucumber, and today I tried to implement a simple example from a tutorial in Intelij and Eclipse and I got the same error when I try run the TestRunner.java. My pom.xml:
Lnoob
  • 97
  • 2
  • 2
  • 10
1 2
3
75 76