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

possible values for @CucumberOptions(plugin = ...)

I am using @CucumberOptions(plugin = {"pretty"} for test report in cucumber but the default colors for this are really bad..so I am looking to change the font color in output report. Anyone as any idea..how proceed further?
swati
  • 41
  • 1
  • 3
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
1 answer

Protractor Cucumber JUnit XML report

I wish to create JUnit style XML reports from Protractor - Cucumber tests so that they can be used by CI. Is there any detailed step on how this can be achieved? Got the protractor-cucumber-junit npm library from below link but the documentation is…
Manya
  • 315
  • 4
  • 17
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
1 answer

Cucumber CDI injection does not work with beans in src/main/java

I have a JEE application in a maven project using JUnit and Cucumber to test my code. The application is using CDI with weld-se in test scope. I have created a simple feature file src/test/resources/specification/first.feature Scenario: Identified…
Marc von Renteln
  • 1,229
  • 15
  • 34
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
1 answer

Cucumber with Guice - multiple guice injector

I'm using Cucumber with Guice as DI. I've encountered following problem: I've got one step i.e. class MyStep() { @Inject private MyService myService; @Given("Some acction happen") public void sthHappen() { …
Eyck
  • 53
  • 6
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

Cucumber-JVM Step definitions

After creating my feature file in eclipse, i run it as a Cucumber feature. i use the step definition the console gives me to create the first base of the test file @Given("^the input is <(\\d+)> <(\\d+)>$") these should be outputted by the console…
R.Stevens
  • 115
  • 2
  • 12
4
votes
1 answer

How to run scenarios in Cucumber-JVM in parallel?

I have a set of acceptance tests written for the Cucumber-JVM. In order to reduce the feedback time I would like to run the scenarios (of a feature) in parallel. How do I do that in the simplest and most convenient way? (I would prefer to be able to…
keyoxy
  • 4,423
  • 2
  • 21
  • 18
4
votes
6 answers

Pass cucumber options dynamically in cucumber-junit?

I understand that @CucumberOptions is used to pass Cucumber options. However, due to the limitation that Java annotations only allow inline constants, it is quite cumbersome to use @CucumberOptions. So, is there a dynamic way to pass Cucumber…
JBT
  • 8,498
  • 18
  • 65
  • 104
4
votes
4 answers

Cucumber/gradle example not generating report?

I'm investigating using gradle and cucumber together, and found this lovely example in cucumber's github. So, I cloned the repository and ran it myself. It failed, as it's configured to do, but I couldn't find the HTML or JSON report that it appears…
Depressio
  • 1,329
  • 2
  • 20
  • 39