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

How to migrate existing java based cucumber test framework to Karate

Karate recently released GUI Automation feature. I always liked the karate way of writing script. I'm thinking to implement Karate's unified framework for Rest + GUI at larger scale in my org. Problem statement: The existing teams uses purely…
Vikas Thange
  • 230
  • 2
  • 13
2
votes
1 answer

How run cucumber using jar?

I have a project with cucumber and maven. I can run and build my project successfully from Intellij IDEA. And I can run project from the command line using: mvn clean test -Dcucumber.options="src/test/resources/features --tags @TEST2" Now I need to…
NeverSleeps
  • 1,439
  • 1
  • 11
  • 39
2
votes
0 answers

Cucumber/TestNg using Java 8 Parallel Streams

I am writing some java code to test an ios native app using Cucumber/Gherkin BDD. I have 2 devices in a single test, sender and rcvr. Because the login process is time consuming, I use java 8 parallel stream for user login into the aforementioned…
Walter Kelt
  • 2,199
  • 1
  • 18
  • 22
2
votes
2 answers

Pass POJOs in Cucumber Example table

Description: As a test developer, I would like to use a single scenario to test 3 different environments. Simplified Scenario example: @smoke Scenario: Login to the login page and assert that the user is logged in Given User navigates to…
2
votes
1 answer

gherkins, Can 2 scenarios be dependent on each other

Scenario1 When a new user clicks on sign up page And provides login ID Then user is signed up and can view profile page. Scenario2 When user clicks on the edit profile page And updates his address Then updated profile should be visible to…
javaGroup456
  • 313
  • 1
  • 6
  • 21
2
votes
2 answers

cucumber - "Test ignored" error while running Runner in IntelliJ

I am trying to run a simple example of cucumber-Junit in Intellij, but not geting error "Test ignored". (I have installed cucumber for Java plugin) My feature file, Runner class, Stepdefinition class and java class look as below: I also tried…
user523956
  • 501
  • 2
  • 9
  • 23
2
votes
0 answers

How can I use @Before tag from cucumber with @Parameters tag from TestNG for a same method

How can I use @Before tag from Cucumber and @Parameters tag from TestNG for a same method? I tried with fetching the parameters from testng.xml file and feeding to @Before tag method, however some how @Before tag gets the value as null before the…
Pradeep Nayak
  • 21
  • 1
  • 2
  • 6
2
votes
1 answer

Unable to link StepDef with features when using the new io.cucumber package after 4.7.1 Cucumber update

I've been trying to link my feature files with my stepdefinition files. I have everything linked properly. The thing is Cucumber has been refactored after 4.3.0 and now when I try to use the "Create Step Definition" option in Intellij I end up using…
2
votes
1 answer

Refer defined variable in Scenario outline example

Feature: Test Type Background: * url host * def name = 'test_name' * def label = name Scenario Outline: Test 2 Given url homeLinks.groupTypesUrl And headers { tenant: #(tenantId), Authorization: #(authToken) } * def…
Santosh Hegde
  • 3,420
  • 10
  • 35
  • 51
2
votes
2 answers

Which is the current method for table.raw in Cucumber

IDEA does not allow me to use table.raw(); I am new in cucumber so while I was learning/practising I tried to get the data from a DataTable by the following code public void iEnterTheFollowingForLogin(DataTable table) { List> data…
vcanopus
  • 23
  • 1
  • 5
2
votes
1 answer

How can we run only specific cukes with Cucumber

I do understand that cucumber itself not providing any such functionality where we can run specific few cukes from cucumber. Note: from cukes I meant multiple folder having different feature files For Example: Folder1: -> one.feature ->…
2
votes
1 answer

Using GOCD with Selenium BDD framework

I have developed BDD cucumber test framework using Selenium and Java. Our dev ops uses GOCD as CI CD tool so I need to integrate framework with GOCD. I have integrated selenium framework with Jenkins numerous times but its my first time with GOCD. I…
Ricky
  • 73
  • 1
  • 12
2
votes
1 answer

Karate test framework: Only one assert using Examples

Suppose that I want to test if my api removes duplicated entries. My current steps are: 1) Post the same JSON request several times using Examples, each request in a different scenario: Scenario Outline: Given path '/endpoint' And request """ { …
italktothewind
  • 1,950
  • 2
  • 28
  • 55
2
votes
1 answer

Cucumber tests invoked not in sequence in Android

I am getting 2 issues 1- Cucumber Test functions in steps are not getting invoked unless i add @After or @Before before step class functions 2- The sequence of functions in steps are not accordingly. Last function getting called first and like wise.…
Sajid Zeb
  • 1,806
  • 18
  • 32
2
votes
3 answers