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

Modify cucumber feature file in Java before running it

Is there a way to run cucumber feature file in java without using the cucumber API annotations? I need to modify the feature file in my code before running it.
Ghayth
  • 894
  • 2
  • 7
  • 18
0
votes
0 answers

can we pass values to cucumber runner class annotations from excel file

Is it possible to pass values to runner class annotations. @RunWith(Cucumber.class) @CucumberOptions(format={"html:output"},features={"src\\Cucumber\\swift.feature"},tags={"@add"}) i want to pass values to "tags" options instead of hardcoding it…
swathi
  • 1
  • 1
0
votes
1 answer

Running cucumber test file from application button

I've set up a test file in src/main/java with my cucumber annotations containing class A, as well as a test file extending class A in src/test/java with the following annotation on class B: @ContextConfiguration(locations =…
0
votes
1 answer

java cucumber pass date as string error

Java - cucumber I am new to writing cucumber test, getting error on given method signature can some one help pls ? following is my feature file entry @txn Feature: ORP Scenario Outline: Save a ORP Given when i pass start date and…
d-man
  • 57,473
  • 85
  • 212
  • 296
0
votes
1 answer

Pass Context from JUnit Runner to Cucumber Steps

I use Cucumber with a JUnit runner. I do App UI Tests with Appium, but that should not matter for this question. The relevant part is that I want to reuse features and step definitions across iOS and Android, and pass the selenium driver instance…
fabb
  • 11,660
  • 13
  • 67
  • 111
0
votes
2 answers

How to use hooks in cucumber?

I am new in cucumber framework. I'm automating login scenarios using cucumber with java. Following is my feature file - And following is step definition file - I wanted to execute setUp() methods once before all scenarios (methods implemented for…
NarendraR
  • 7,577
  • 10
  • 44
  • 82
0
votes
0 answers

How to add Firefox to Path for Cucumber and Selenium

I am using Conductor framework for Selenium. I am using Cucumber as JUnit test runner. I am using Firefox webdriver but unable to add Firefox binaries to path. If I add -Dwebdriver.Firefox.bin="path" as JVM argument cucumber throws error. I also…
Forkmohit
  • 733
  • 3
  • 12
  • 31
0
votes
0 answers

Exception in thread "main" java.lang.NoSuchMethodError: org.junit

I am trying to set up a cucumber framework for my project. I am getting following error.Not sure if this is related to Junit versioning upgrade. Exception in thread…
Madhumita
  • 21
  • 2
  • 8
0
votes
1 answer

Java cucumber - java.lang.NoSuchMethodError: gherkin.parser.Parser.parse

Trying to implement cucumber to do some automated tests. When I run my tests using junit I am getting below error Project path: src/test/java/ cucumberJava -cucumberjava,java -runtest.java -cucumberJava.feature Runtest.java code package…
user6323298
  • 33
  • 2
  • 15
0
votes
0 answers

Appium :cucumber FAILED (DuplicateStepDefinitionException)

Previously I was working with calabash and recently jumped on to Appium. I need some help on Appium-CI-Bamboo issue. The Automation scripts were written in Java-Junit using gradle in cucumber format. It's working fine locally but fails on Bamboo…
vamc
  • 125
  • 1
  • 2
  • 13
0
votes
0 answers

Cucumber - Report Generation for feature-overview.html

Need suggestion on how to create a report using Cucumber-jvm on HTML Advanced report. As of now I can able to generate index.html file which is a basic html report generated while running the runner class for the cucumber. But I need to generate…
Suresh Sa
  • 1
  • 1
0
votes
1 answer

Getting this error while trying BDD cucumber Selenium when designing Page object model

Exception in thread "main" cucumber.runtime.CucumberException: java.lang.AbstractMethodError: cucumber.runtime.java.picocontainer.PicoFactory.addClass(Ljava/lang/Class;)V at…
0
votes
1 answer

Implementing common methods across multiple Steps Files in Cucumber

pom.xml info.cukes cucumber-java 1.1.8 test info.cukes cucumber-core
0
votes
2 answers

Browser not opening when running Cucumber tests from Jenkins

I'm trying to run Cucumber Selenium project from Jenkins configured with Maven, but the browser is not opening and execution fails. When I execute the same project from command prompt using mvn test, the execution happens as expected. Below is the…
Srinivasan Ramu
  • 1,033
  • 4
  • 11
  • 23
0
votes
2 answers

cucumber runner files is not able to pickup features/classes when run from maven

I am able to run my cucumber runner file(as JUnit) without any issues. Tests are picked up and running fine. But when i run through maven, though maven points to the Runner file, unable to execute tests. Please find my maven logs and pom.xml file.…
Uday
  • 1,433
  • 10
  • 36
  • 57