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

How to add a default timeout for all Cucumber steps?

I am using a Selenium-Cucumber-Java framework for automation. I need to restrict the run duration of my scenarios in such a way that max 30 mins should be taken for any scenario and fail the scenario if it takes more time than that. I found this…
SP.
  • 85
  • 3
  • 13
2
votes
3 answers

java.lang.NullPointerException when executing cucumber feature file through step definition file using cucumber-junit with Java

While running a cucumber feature file using junit with Java, I am getting a NULL pointer exception. I am not able to understand why this exception is coming up. This is my step definition file, written in java. import java.util.List; import…
Ab123
  • 415
  • 2
  • 13
  • 34
2
votes
0 answers

Maven-plugin execution in gradle

I've implemented an automated appium test for a mobile application using cucumber and a JUnit runner. In order to generate pretty reports, I'd like to use net.masterthought's maven-cucumber-reporting artifact.
beware_bear
  • 67
  • 12
2
votes
5 answers

cucumber java plugin not working properly in Intelij

I have been using my cucumber project on the Intelij for a very long time and it was working perfect. However, I upgraded the machine and so installed the latest version of Intelij. I installed the cucumber-java plugin (and gherkins), however it…
Gaurang Shah
  • 11,764
  • 9
  • 74
  • 137
2
votes
1 answer

using protractor-cucumber-framework for testing it gives this error

Hello friends i testing my angular 2 app using protractor and cucumber js but it give me this error i try several solution for this issue but no one can solve my issue.if you know any sol it would be great thank u.. [1] Unhandled rejection…
2
votes
1 answer

cucumber - [31mFailed scenarios:[0m Console message

I have created a java-Cucumber test suite and its integrated in Jenkin and works fime. Mu Question is when any script fails. I am getting below message in console. [31mFailed scenarios:[0m [31mfeatures/XXXXXX.feature:5 [0m# Scenario: XXXXX…
nivek
  • 21
  • 2
2
votes
1 answer

cucumber giving null pointer exception with multiple scenario in feature file

Test Steps public class TestSmoke { WebDriver driver; @Given("^open firefox and start application$")jjj public void open_firefox_and_start_application() throws Throwable { driver=new FirefoxDriver(); …
2
votes
2 answers

Spring Batch : How to instantiate "Step" scope bean in Cucumber Testing?

How to instantiate "Step" scope bean of spring in Cucumber Testing? SpringJUnit4ClassRunner uses @TestExecutionListeners to instantiate the step scoped beans for testing purpose. I am trying get this behavior in Cucumber. Cucumber uses a…
2
votes
2 answers

How to structure sequential test with cucumber tags and JUnit?

I have a dream I would like to achive with Cucumber. I would like to combine cucumber with selenium (<= so far so good) AND optimize the test execution with tags. In my dream I'm able to tag my szenarios with Strings which represent a database…
MarcelHodan
  • 580
  • 1
  • 7
  • 27
2
votes
6 answers

Cucumber : java.lang.IllegalArgumentException: Not a file or directory: G:\Codebase\MavenCucumber\--plugin

Using Maven whenever I am trying run my feature file in eclipse I am getting below error: Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: G:\Codebase\MavenCucumber--plugin at…
Avijit
  • 1,770
  • 5
  • 16
  • 34
2
votes
4 answers

How do I define "I Want" steps in cucumber using Java?

How do I define the "I Want" steps from my feature using java? I have my cucumber project setup like this: Login.feature Feature: User Login I want to test on "www.google.com" Scenario: Successfully log in Given I am logged out When I…
Katie
  • 45,622
  • 19
  • 93
  • 125
2
votes
2 answers

How to stop execution of a Cucumber feature if any of the scenarios had failed

If I have 10 scenarios in a feature file and if one scenario fails then I want to stop executing or proceeding with next scenario. I want to terminate the execution for that particular feature file. How can I do that in Java?
Samantha
  • 357
  • 2
  • 7
  • 17
2
votes
4 answers

How to read excel file in cucumber project?

I am creating testing automation framework using java but i am not able to read excel file in cucumber. is there any way to use @DataProvider functionality og testNG? I do not want to use datatable of feature file.
2
votes
3 answers

Serenity BDD test cases are not running on Chrome browser

My Serenity BDD test cases are running fine on firefox when I used below annotations in step definition file: @Managed public WebDriver driver; I wanted to run same test cases on chrome browser. So, modified it as below: @Managed(driver =…
Durgesh
  • 585
  • 4
  • 12
  • 33
2
votes
1 answer

Cucumber not running selenium Code

When I try to run my code, it only shows cucumber skeleton. I use a JUnit runner class as JUnit test suite. Code is below for all three classes. Feature is : Feature: Check addition in Google calculator In order to verify that google calculator…
fahad
  • 389
  • 2
  • 12