Questions tagged [cucumber-junit]

The JUnit integration provided by the Cucumber-Jvm project.

Cucumber-Jvm is the pure java rewrite of Cuke4Duke which just a port of Cucumber from Ruby to JRuby. Cucumber-JUnit provides integration with JUnit so that Gherkin tests can be run alongside other JUnit tests.

562 questions
3
votes
1 answer

How to implement AND OR relation in Cucumber-JVM

I have a feature file which looks like below : Feature: This is a sample feature file @tag1 Scenario: This is a scenario one. Given scenario one When @tag1 Then execute @tag1 @tag2 Scenario: This is a scenario…
saba
  • 539
  • 1
  • 14
  • 30
3
votes
1 answer

Send get request from steps generated from cucumber feature

I am new to cucumber. I've configured the environment for cucumber with required jars. I want to test rest api with cucumber. And so first created .feature file and generated basic step definitions. .feature file: Feature: Test Scenario: List…
Valay
  • 1,991
  • 2
  • 43
  • 98
3
votes
1 answer

Syntax of --glue option for Java Cucumber cli (cucumber.api.cli.Main)

I'm trying to run Cucumber cli from a Windows command line (Windows 10). All good thus far. I can get it to load my *.feature files from the correct place and tell me which methods I need to implement. I've created a class with @Give, @When, @Then…
3
votes
1 answer

How can i verify the Cucumber jars while using it with selenium

I am trying to incorporate cucumber with selenium using Java . I have included the following jars into my classpath . 1. cucumber-core-1.2.0.jar 2. cucumber-java-1.2.0.jar 3. cucumber-junit-1.2.0.jar 4. cucumber-jvm-deps-1.0.3.jar 5.…
sharan
  • 213
  • 9
  • 17
3
votes
2 answers

Cucumber PendingExceprion for test steps in Intellij IDEA

Erly I asked this question about cucumber and java. After correct my project, I checked PendingException in cucumber-junit. I have 2 classes: TestClass.java for working with SoapUI, TestSteps.java for implementation cucumber steps with my code and…
Giymose
  • 201
  • 1
  • 6
  • 21
3
votes
2 answers

Unable to run Cucumber tests from maven

My Maven Project Structure is The project runs well If I try to run it through eclipse as JUnitTest (CucumberRunnerTest.java). But if I try executing it through maven then I get the below error: The pom is as below:
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

CucumberOptions tag is being ignored when @Suite Junit is used

@Suite @SuiteDisplayName("NAME") @IncludeEngines("cucumber") @SelectClasspathResource("cucumber/tests") @ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "cucumber.tests") @CucumberOptions(tags = "not @IGNORE") public class RunCucumberTests…
2
votes
2 answers

Running tests with cucumber-junit-platform-engine and Selenium WebDriver opens too many threads

I have tried to configure an existing Maven project to run using cucumber-junit-platform-engine. I have used this repo as inspiration. I added the Maven dependencies needed, as in the linked project using spring-boot-starter-parent version 2.4.5 and…
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
1 answer

Can we use regular expression to mention cucumber options feature files?

@CucumberOptions(features = {"src/test/resources/features/module*.feature"}, tags = "@E2e",) mvn clean verify -Dcucumber.features=”module*.feature” -Dcucumber.filter.tags="@E2E" Is there any way to use regex to identify feature files? It takes it up…