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

Why am I getting an ArrayIndexOutOfBoundsException running this particular Cucumber step in Kotlin?

I'm running with a Cucumber JVM feature file, using Java8 and PicoContainer. I've stripped these steps right down so they're empty, and I'm still getting an error. Here's my feature: Feature: Full Journey Scenario: Can load a typical JIRA csv and…
Lunivore
  • 17,277
  • 4
  • 47
  • 92
4
votes
2 answers

Cucumber reports getting overwritten when a new feature file is executed

I am writing a test suite and have came across an issue. I am using cucumber and have defined multiple feature files. When I run the test pack the progress (html report and json format) of one feature file gets over-written when the next feature…
4
votes
1 answer

How do I run my cucumber-jvm features in parallel? (with maven using cucumber-jvm-parallel-plugin)

I am trying to incorporate a maven plugin cucumber-jvm-parallel-plugin into my Cucumber-JVM code and am running into some problems... I think I have configured my pom.xml properly, but my cucumber features are still getting ran one by one instead of…
Katie
  • 45,622
  • 19
  • 93
  • 125
4
votes
2 answers

Cucumber and Spring boot integration has error

Spring boot and cucumber integration, when I do package this project become jar use mvn package command and produce advvic-1.0.jar. But, if I run this jar java -jar target/advvic-1.0.jar I get this error : Caused by:…
sahmada
  • 317
  • 1
  • 3
  • 19
4
votes
2 answers

Combine Multiple json results in one, updated Cucumber-JVM Report

I have two runners in my automation project as follows: Main runner - Executes all the @ui-test tagged test cases and if a scenario is failed target/rerun.txt will be populated with the scenario location (e.g.…
LeeWay
  • 793
  • 3
  • 16
  • 28
4
votes
2 answers

Selenium web driver moveToElement (Actions) throwing error with marionette driver?

Getting following error in selenium tests POST /session/ee1b9201-dadc-7446-b753-0a418a230d30/moveto did not match a known command What i've done is Actions resetView = new…
4
votes
1 answer

How to run the same feature file multiple times with different data (language) set for every new run in Cucumber JVM

My case in Cucumber JVM,I need to run the entire "case.feature" file with 5 Scenarios set on Language 1, Locale 1 first time,and then run the same entire "case.feature" set on Language 2, Locale 2 second time ,is there a way to set this up…
4
votes
1 answer

Cucumber Java with Spring Boot Integration - Spring @Autowired throws NullPointer Exception

I am writing cucumber-java unit tests for a Spring boot application testing each functionalities. When i integrated with spring boot, the @Autowired classes throws NullPointer Exception. The spring boot application…
4
votes
2 answers

Run a single cucumber scenario from an executable JAR

I would like to package my acceptance tests into an executable JAR where all necessary libraries are included for running the tests and generating the reports. I would also like to either run all tests or a single test. So far, I'm able to run all…
4
votes
3 answers

How to create dynamic glue in cucumber java based on the feature file location?

I am having a java project which is built using maven. I have multiple packages,feature files based on different functionalities. The project test structure is as below. src ->test ->java ->com ->usercreation …
googytech
  • 479
  • 4
  • 7
  • 18
4
votes
2 answers

How to write numbers in cucumber scenarios

I would like to write a number in cucumber page. Please let me know How can I write this. Scenario Outline: Enter an invalid URL Given the context "Invalid URL" is open on "Market" When user is on the error 404 page Then page not found message…
user2340124
  • 81
  • 3
  • 3
  • 12
4
votes
2 answers

How to read data from external file in cucumber instead of mentioning huge data's in example section? I am using Cucumber-jvm

@@file_name Feature: Addition In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers Scenario: Add two numbers Given I have entered @number1 into the calculator And I have entered @number2 into the…
Susanta Adhikary
  • 257
  • 2
  • 6
  • 20
3
votes
2 answers

Can DataTable and Parameter be used at the same time in Cucumber?

Something I've been running into several times now. Example: Scenario: When I flick the switch, different colors appear Given that the electricity bill is paid When switch flicked is true | blue | | green | | red | …
Robert van der Spek
  • 1,017
  • 3
  • 16
  • 37
3
votes
1 answer

How to avoid Cucumber from recreating or refreshing the app context

My cucumber tests get the spring boot context refreshed on each pass, I have some database cache being done and it is killing the performance of the compilation process. My abstract test is marked as @SpringBootTest(defined_port) with a…
Chuck
  • 235
  • 3
  • 9
3
votes
2 answers

Cucumber and WebDriver, opening chrome when it is not necessary

I'm starting with cucumber, following some tutorials and such. I have two feature files, one with basic stuff you see on cucumber's "get started", another one from WebDriver's "get started". The tests run successfully, but cucumber opens the…
res
  • 775
  • 8
  • 16