Questions tagged [cucumber-jvm]

Cucumber-JVM is a Cucumber implementation for the most popular JVM languages. Cucumber-JVM currently supports Java. There are also implementations for the following JVM languages, but as of version 2.1.0, they are unsupported: Groovy Scala Clojure Jython JRuby Rhino JavaScript Gosu

Cucumber-jvm is a Java-based tool for behavior-driven development.

Cucumber-JVM is a pure Java implementation of Cucumber, with native support for the most popular JVM languages: Java, Scala, Groovy, Clojure, Rhino, Jython and JRuby.

Cucumber-JVM is the successor of Cuke4Duke, which was the Ruby implementation of Cucumber, running on JRuby. It is faster and also easier to run than its predecessor.

See GitHub project

1356 questions
0
votes
1 answer

How to integrate cucumber-jvm with maven build

i'm trying to put some bdd into my eclipse plugin project, but can't figure out how to run my integration tests during maven build fase. To write my tests i'm using SWTBot framework. I already did the feature generation fase, and setup my tests. How…
keysuke
  • 97
  • 1
  • 1
  • 9
0
votes
1 answer

Execute Cucumber Specs from a grails plugin

in my grails apps, i have different plugins, that are used from all apps. these plugins have cucumber specifications and geb pages within "test/functional". What i would like to do, is in every app, that uses a plugin, the tests of the plugin should…
Mario David
  • 1,595
  • 11
  • 19
0
votes
1 answer

Testing Cucumber Java snapshot not being attached properly

I am using following code to attach the snapshot in json import cucumber.api.java.After; @After public void tearDown(Scenario scenario) { if (scenario.isFailed()) { final byte[] screenshot = ((TakesScreenshot) driver) …
Navdeep Singh
  • 699
  • 1
  • 10
  • 25
0
votes
1 answer

Execute EasyMock.replay() after all Given steps in Cucumber

So this is basically the same question as this, but my motivation is different. Also I'm using cucumber-jvm not the ruby version. Basically I want to record an expectation with EasyMock.expect() in each Given step, then after all steps are processed…
Jakub Bochenski
  • 3,113
  • 4
  • 33
  • 61
0
votes
1 answer

cucumber-guice - using the injector

I am new to cucumber-jvm (and am returning to Java from a cucumber, Ruby background of a couple of years) Using cucumber-guice I have successfully bound my dependencies and loaded my properties in a CucumberModule, and as such the @Inject annotation…
Mark
  • 3
  • 1
  • 2
0
votes
1 answer

Using Scenario Outline and Examples with Strings

I'm facing the following "issue" when trying out cucumber-jvm with an Arabic to Roman Numeral converter - the "then" piece gets converted into several step defs instead of one. here's my scenario outline: Scenario Outline: Given a romanizer When I…
Nilesh
  • 125
  • 1
  • 8
0
votes
1 answer

Cucumber-Jvm retry failed Scenarios

I want to automatically retry failed tests to improve the reliability of my tests similar to the TestRule found within Junit I want the flexibility to insert logic around the tests so I can implement a retry loop: I’m using Cucumber-JVM and need a…
0
votes
2 answers

How to access common variables created through Gherkin step definitions in Java without redundancy?

We have a couple of feature files, that share common steps. Login for example is the simplest step that comes to mind, if I want to get the user object that the login step created and was set in the LoginStepDefinitions.java file. Is it in my…
Mohamed Sobhy
  • 385
  • 1
  • 5
  • 17
0
votes
1 answer

Automating Browser with Cucumber with the use of Parameter

How to use parameter for example: @When("^I enter \"([^\"]*)\" in the Keywords textbox$") public void I_enter_in_the_Keywords_textbox(String Job ) throws Throwable{ driver.findElement(By.id(id)).sendKeys(Job); } In the File I have: When I…
Emily
  • 3
  • 3
0
votes
1 answer

Get File of a Scenario in Cucumber-jvm

In Ruby, I can get the name of a Scenario file (e.g. "login.feature") using: scenario.file.to_s - (http://rdoc.info/gems/cucumber/Cucumber/Ast/HasLocation#file-instance_method) Is there a way to do this in Cucumber-JVM?
0
votes
1 answer

Cucumber Junit Testing Code

I tried to work with webdriver to see if the cucumber will open browser with junit. It is recognizing everything except for opening the web browser or even doing what I asked to do. Here is the code snippet: public class JobSearch { …
0
votes
2 answers

How does the intended usage of cucumber-jvm's "@Before" differ from "Given"?

They are both used to fulfill preconditions for a test. I can't really tell when I should use @Before (cucumber.api.java.Before) or when I should use @Given (cucumber.api.java.en.Given). When should I prefer/use one over the other?
Jerry
  • 3
  • 1
0
votes
1 answer

Make Jenkins, Appium, Cucumber-Jvm and Android Emulator working together

I'm trying to make all this stuff work together. Created a jenkins job with this configuration: Environment Build: android-19 emulator spawned by the andorid emulator jenkins plugin Build steps: Appium starting in this way: appium --full-reset…
ReDirEct__
  • 61
  • 6
0
votes
2 answers

Trying to setup a cucumber-project in eclipse without using Maven

I am new to cucumber, I am trying to configure a Java-project without using Maven, I am having the following exception. I think there is an issue with the path of a .feature file Exception: java.lang.NoClassDefFoundError:…
Zain
  • 5,391
  • 11
  • 34
  • 34
0
votes
1 answer

Specifying a digit in cucumber feature file

Question may sound novice. But here i am everytime i try writing iphone5 in my cucumber feature file it parameterises the 5. I dont want this to happen and want it to just treat iphone5 as a string. The line in my feature file causing this is: Then…
trial999
  • 1,646
  • 6
  • 21
  • 36