Questions tagged [cucumber]

Cucumber is a tool for running automated acceptance tests written in a BDD (behaviour-driven development) style.

Filter by
Sorted by
Tagged with
6
votes
3answers
478 views

Is the Page Object Pattern the ideal approach for browser automation for a website which has a front-end that has frames in frames?

I'm confronted with a web application which has a front-end that has frames in frames in frames. Regarding automated UI Tests with Selenium and Cucumber, is the Page Object Pattern the right approach ...
1
vote
1answer
34 views

Guidelines on how to use Cucumber Java Scenario interface

I'm looking for information/guidelines on how to use io.cucumber.core.api.Scenario interface? I read through the API reference documentation and Official Cucumber-Java documentation and some scattered ...
-1
votes
0answers
20 views

Login to user and admin pages without any condition verification using cucumber [closed]

I provided user id and password credentials in feature file for both admin and user. I have to login to user and admin pages as per the credentials. I should not use any conditional check during ...
0
votes
0answers
13 views

How can I set the file name of the cucumber reports using net.masterthought plugin?

I'm having issues setting up the file names from the masterthought plugin. https://github.com/damianszczepanik/cucumber-reporting TecStack from the project. java, junit, cucucumber, maven. For ...
0
votes
0answers
17 views

How to run background only once

Using Cucumber with Javascript and Selenium I have the following Gherking file Feature: Login Background: Given database is filled with these emails and passwords. | tobias@hotmail.com | ...
1
vote
3answers
45 views

Cucumber feature file name is Jira ticket number

I am starting to name my cucumber .feature files as VerifyLogin_JIRA-1211.feature Is this the correct/optimum naming convention? This question might get closed due to "opinion-based" but there is ...
0
votes
0answers
82 views

Undefined step reference for import io.cucumber.java8.En on Intellij Idea

I am not able to define reference for java8 cucumber. Using Intellij 2019.1.1 version *.feature file is registered in File Types (Examples in feature files are recognized, but not steps) Cucumber for ...
0
votes
0answers
16 views

read otp from seetest mobile application and paste to continue with login process in web application

I am using cucumber and configure appium and seetest to run web application on mobile browser, i want to check otp that is sent via my application to mobile number (on seetest device number which is i ...
2
votes
2answers
176 views

How to send API request json body in cucumber

Can anyone help me to send json request in one line ?? Example { "benefitPlanIDs": [ { "benefitPlanID": "011748abc", "benefitPlanPlatform": "abc" } ], "clientId": "abc", "...
1
vote
1answer
127 views

How to access step definition variables using hooks.js

Hi in the below protractor-cucumber step-definition, I can modify the step definition variable 'a' from before hook : "use strict"; let { Given, Before } = require('cucumber'); let a=...
3
votes
1answer
88 views

How to resolve NullPointerException error while implementing POM with cucumber framework

I am getting java.lang.NullPointerException while executing my test case, I am using Page Object Modle with cucumber framework in my maven project, following are the code snippets BoxJunitScript.java ...
3
votes
2answers
598 views

Code coverage for Selenium Tests

Is there any tool available to determine the code coverage for my selenium tests? My tests are written in Java having use of selenium WebDriver with BDD-Cucumber implementation in it.
2
votes
1answer
26 views

Ignoring some test steps depending on variables

I'm using Cucumber + Java + Selenium to UI test an application. I'm using the same set of tests whether my application is deployed in qualification (for tests) or in production. However, when I'm ...
1
vote
2answers
56 views

Check that an element does not exist *after* a button is clicked

With ruby, I'm doing some cucumber tests with capybara to test a Shiny application (shiny is a R package to do web applications). But I'm a newbie with ruby and cucumber (and this is my first post ...
1
vote
1answer
31 views

Cucumber-jvm - Retrieving embedded image from TestCaseFinished event

I have a cucumber plugin where I post my test case results to TestRail using the TestCaseFinished event. It works so far, but on failed steps, I use the scenario.embed method to add a screenshot of ...
5
votes
2answers
291 views

Actual Steps in Step Definition or Call Test Cases in Step Definition, What's the Best Practice?

I'm currently working on a Cucumber project using Katalon Studio, and I'm not sure if... I need to directly write the test items on Step Definition file OR Should I call the test cases in Step ...
0
votes
1answer
61 views

Number of actors in E2E tests

We have roughly 30 Cucumber tests and a few actors that run these tests that have been created based on our service's personas. Exemplifying this: We have a C2C ecommerce platform and an user. Users ...
1
vote
5answers
100 views

Any advantage to using particular language from Cucumber? BDD enquiry?

I'm curious, I'm only just beginning a journey into the BDD and wondering if there any advantages to the languages which Cucumber (Gherkin) can translate to? I note that some languages are not ...
0
votes
2answers
46 views

Cucumber sentence autocomplete

I have a difficulty with writing Cucumber tests. The re-usability of the Cucumber sentences is not consistent - I would like to avoid code duplication when creating sentences and methods glued to the ...
3
votes
2answers
3k views

IntelliJ feature file undefined step reference with import io.cucumber.java.en.Given

I have a feature file with the following: Scenario: Test something Given I do something to test something My step definition: import io.cucumber.java.en.Given; ... @Given("I do something to ...
-1
votes
1answer
63 views

Unit Testing and Integration Testing with Robot and Cucumber

I understand that both frameworks are great for acceptance testing but how hard or more complex is writing lower level tests such as integration tests or unit tests using the mentioned frameworks when ...
-1
votes
1answer
179 views

Getting Null pointer exception

I am new to Cucumber and I am trying a basic cucumber test. I am getting the below error while running the test. java.lang.NullPointerException at stepDefinitions.Test_steps....
-1
votes
1answer
84 views

Cucumber with and without Rest - Assured. What are the advantages?

Currently my team uses Cucumber as a testing framework. We need to start testing REST web services. I understood that REST-Assured is one of the leading tools for that. Can these tools be used in ...
2
votes
2answers
3k views

Cucumber sending string list as parameter

I am using cucumber 4.3.0 and I would like to send an ArrayList of String in one of my sentences. It would give something like that: Given I am on page <page> When I do stuff Then keywords "...
0
votes
1answer
122 views

Can cucumber tag a single step?

The application that I'm testing receives input from an outside sensor, but sensor data is unavailable on the test environment. Therefore, I use mock data. The problem is, mock data requires some more ...
1
vote
1answer
330 views

How do I store a value in a global variable and then use it in subsequent steps of a scenario in protractor cucumber typescript based project

I want to retrieve a value in 'Given' function and then store it in a global variable so that the value is accessible in subsequent steps of a scenario in protractor cucumber typescript based ...
0
votes
1answer
52 views

Using a small number of available user properties across a large number of threads

I'm currently building a testing framework for functional tests. I can run them in parallel using Cucumber but I have run into a problem in creating users for each thread (each test requires a brand ...
0
votes
0answers
692 views

getting null pointer exception for different step definition files with cucumber and selenium

Browser utility: package com.gmsr.utility; import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class BrowserUtility { ...
0
votes
0answers
1k views

Cucumber and TestNG, how to pass parameter?

Could you please tell, how to pass parameter in Cucumber using TestNG? I have following code, but it does not work. Error in stepDefinition.java on the line @Parameters({"environment"}) testng.xml &...
1
vote
1answer
325 views

Display scenario/test names in Browserstack

I've got a set of cucumber tests I'm running using ruby/capybara. I have the tests outputting to Browserstack but it only outputs the session ID which isn't of much use to me and want to replace with ...
1
vote
1answer
430 views

How to Embed / Attach screenshots when each step is executed in Cucumber

I need to take a screenshot after each step of execution and embed them in results. I have tried using the "After" method but it captures only the last screen and displays it at the end of the report.
1
vote
1answer
52 views

Possibilities on integrating existing cucumber framework with appium

I have an existing automated suite for web browser based application on cucumber framework using selenium and java. We are now planning to run the same test scripts for the mobile app of same ...
1
vote
1answer
293 views

I Wanted to know if we can use Katalon for Cucumber BDD frame work but, with Java and not Groovy scripts?

We are using Katalon, but I always wanted to use Cucumber BDD framework. I have he seen that Katalon 5.7 started incorporating Cucumber BDD framework. But, I am not sure how to use it for Java as ...
1
vote
2answers
188 views

Using same table for When and Then in gherkin scenario

I have a scenario where I need to insert some data in the system and after that, I check if that data was inserted correctly. Something like: Given the user in the insertion screen When he inserts ...
1
vote
0answers
49 views

Is it possible to write good Code (create a good code framework) AND use Cucumber (or another Gherkin tool)?

When I look at the code Cucumber outputs, it does not seem to follow best practices (or any moderately good practices) for writing a testing framework. Question: Is there a way to use Cucumber and ...
2
votes
3answers
98 views

Behavioural Gherkin Steps requiring complex Step Definitions when Automating

I'm currently part of a team that is trying to reinforce BDD in our tests and automation. Our tests up to this point were procedural and we want to move towards behavioural steps. An example of our ...
1
vote
1answer
258 views

Cucumber Protractor tests is returning 0 scenarios

I was trying to run a sample test in cucumber protractor javascript tests. But it is returning 0 scenarios.Could someone please look into my code pasted below. sample_scenario.feature Feature: To ...
2
votes
1answer
277 views

Selenium exception is reported twice in logs

I am using Cucumber Page Object model to execute my tests. Here is my POM file:- <dependencies> <dependency> <groupId>info.cukes</groupId> <artifactId&...
1
vote
2answers
858 views

'to.include' is not working where 'to.eventually.equal' is working

I was trying to check whether a string is present in another string. I am using the below code: expect(actualTimeZone).to.include(employee.timeZone); But it is giving the below error: ...
3
votes
1answer
537 views

How to pass the same webdriver instance between Cucumber tests?

I have a series of steps in a Cucumber-automated test for a web-site. In some cases, I need to pass the Selenium webdriver instance, such that the test can use it to wait until certain elements on the ...
0
votes
1answer
47 views

How do I write a gherkin specification to check a large list of values? [closed]

I'm working to write a specification with gherkin (for the first time) for a REST API which will return a long list of paged items (1000 items per page). I'm curious if there's a good way in gherkin ...
1
vote
1answer
176 views

Why Cucumber repeats Java/Selenium exception text?

For example, tried to locale a web page element by ID and it was not there - why Cucumber repeats the Java output (in addition to - expected - its own scenario/feature/steps failure text) and can I ...
0
votes
1answer
656 views

Selenium is not performing Click Action on the Radio Button

Issue: I am trying to perform a click on a radio Button but it is not working it just bypass the step and perform the next step doesn't even give me any error message *Intention is to click on refund ...
0
votes
1answer
1k views

How can I create a dynamic feature file in Cucumber?

I have knowledge about static feature file and it is tough to handle for test case. I want to create dynamic feature file or dynamic content for test case in feature file.
0
votes
1answer
72 views

How to enter text into a text field nested in an iFrame?

I am using Ruby with Cucumber and attempting to build up a suite of automated tests against a dynamics 2013 system. We have a cart that is a nested into an iFrame and we are attempting to enter a ...
1
vote
1answer
84 views

How can I bypass the mixed content error

I am getting the below error when I was trying to approve a document in a webpage Mixed Content: The page at \'https://example.com\' was loaded over HTTPS, but requested an insecure resource \'http://...
0
votes
2answers
64 views

Cucumber > Saving State up to a Step

I am using Cucumber through IntelliJ and am working on fixing a broken test. I was wondering when debugging, is there a way to save the state of the system up to a certain step in the feature file, if ...
0
votes
1answer
87 views

Cucumber Feature on executing throwing "The path to the driver executable must be set by the webdriver.chrome.driver system property;

I am Using Cucumber Selenium Framework for Test Execution. And I have set system Properties correctly because the same script was running fine but now it is throwing "The path to the driver ...
1
vote
0answers
24 views

Is it possible to have different logger paths per cucumber features or scenarios?

So I'm using selenium with cucumber and right now and run my tests sequentially, at the end of the execution I collect the log and the prints. My question is, once I start executing them in parallel, ...
0
votes
1answer
72 views

How to keep a single browser window open during multiple search for a website in the code?

I want to search for different items in a website multiple times and add the item to cart after each search and proceed to checkout after last search. Cucumber opens the new browser for every row in ...