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
3
votes
3 answers

Pass parameters to @Cucumber.Options dynamically

I am using cucmber+selenium. Is there a way i can pass options to @Cucumber.Options dynamically. Something like- features="src/YahooSearch.feature" // i want to take this feature file names from excel & put here...
Deepak
  • 336
  • 1
  • 3
  • 10
3
votes
1 answer

Escape characters in Cucumber step definition

I have following steps that I am using for Cucumber-jvm. How do I escape certain characters in my step definitions? When user verifies if ABC widget exists Then the 'The 7 Things $channel' label is displayed In this case I need to escape 7 and $ as…
nabster
  • 1,561
  • 2
  • 20
  • 32
2
votes
1 answer

Cucumber Integration Test not seen by Maven Failsafe

I've created a Micronaut/Cucumber/JUnit5 test and am trying to run it as an integration test with Maven's Failsafe plugin. When I run it as a normal test, Cucumber works properly. When I change the name of the test to FooIT and run mvn verify,…
2
votes
2 answers

Can we pass Cucumber Options values like Features and Tags values dynamically from TestNg.xml file?

I am trying to run my regression test suite from TestNg.xml file. Most Testcases use different tags and different feature filenames. So i want to pass these input as a parameter from TestNg.xml file. I currently have duplicate runner class with…
2
votes
1 answer

How to config typeregistryconfigurer in cucumber 7

I want to have automatic configuration for types in cucumber 7 , do you know how can I config typeregistryconfigurer in cucumber 7 ?
Tohid Makari
  • 1,700
  • 3
  • 15
  • 29
2
votes
1 answer

How to generate Cucumber Report HTML locally

I want to generate Cucumber HTML Report Locally, but not able to do so. I have followed lot of YT videos and blogs but they are using @CucumberOptions which is deprecated and also requires Runner. I am new with Cucumber, I followed Cucumber 10 min…
Chetan Krishna
  • 131
  • 1
  • 2
  • 8
2
votes
1 answer

when condtion is not matched job should be exit in gitLab CICD Pipleline

I am facing an issue in GitLab that is when I use reg tag it executes my regression test suite. But when I give any other tag value it runs pipeline without any error. Please tell me how to add the condition in which only reg tag should work or else…
2
votes
2 answers

Cucumber-JUnit control parallel tests with tags

Recently I created a framework with Cucumber-JUnit where I am able to execute Scenarios in parallel (For now keeping one scenario per feature) without any issue. Now I have a situation where some of the features has to run in parallel and some in…
User 0234
  • 135
  • 2
  • 11
2
votes
2 answers

no tests executed after migrating to cucumber 7.x

I upgraded recently my Spring Boot project to the latest cucumber-java (7.2.3), and I am facing some issues. I am able to have the expected behavior, but only by using the now deprecated @Cucumber annotation. the deprecation note says that we should…
Vincent F
  • 6,523
  • 7
  • 37
  • 79
2
votes
2 answers

Cucumber step not binding with step definitions when using Example block

I am using cucumber with java. When i am trying to pass value from Example block steps are not binding with the step definitions. Throwing steps undefined step reference error on feature file. Feature File code: Scenario Outline: Verify "Create your…
2
votes
2 answers

Parallel execution of features file causes null pointer exception printer out on console

I have tried to code cucumber parallel execution of feature file, but there is an error printed out on console like this: [TestNG-PoolService-0] ERROR com.nicholas.StepsDef.ExportProduct - java.lang.NullPointerException Element info: {Using=xpath,…
nicholas
  • 2,581
  • 14
  • 66
  • 104
2
votes
2 answers

JUnit + Cucumber in IntelliJ - See Steps

I have a Cucumber project that is configured to run with Junit by configuring my Junit test with @RunWith(Cucumber.class) @CucumberOptions( extraGlue = "me.jkstrauss.stepdefs.common", plugin = {"pretty",…
Joseph K. Strauss
  • 4,683
  • 1
  • 23
  • 40
2
votes
1 answer

maven failsafe plugin is not reporting cucumber test execution statistics

I am using below library versions in my SpringBoot project and cucumber for integrations tests, Java - 11.0.11 Maven - 3.8.1 SpringBoot - 2.3.12.RELEASE Cucumber - 6.10.4 Junit5 Jupiter - 5.4.0 Failsafe plugin - 3.0.0-M5 Although cucumber feature…
2
votes
2 answers

@MockBean injected correctly but with null value on test class

I am using tests with Cucumber and Spring Boot @CucumberContextConfiguration @ActiveProfiles(profiles = { "cucumber" }) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE) @ExtendWith(SpringExtension.class) public class FooTest { …
Hayi
  • 6,972
  • 26
  • 80
  • 139