Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cucumber]

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

0
votes
1answer
26 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
43 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 ...
0
votes
0answers
22 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
0answers
45 views

Get serenity html reports parallel during execution

Am using serenity with cucumber. Here the html report created for each scenario is with random string. My questions: 1. Can we rename those individual html report by scenario name?. 2. Is the ...
1
vote
1answer
36 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 ...
2
votes
4answers
553 views

Cucumber : Is it necessary to create multiple step defination class for single feature with multiple scenarios?

I have created one feature file which has 4 scenarios. Do I need to create 4 step definitions or only 1? If 1 then is it ok to have multiple @Given, @When and @Then in one step definition?
0
votes
1answer
53 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 ...
3
votes
3answers
423 views

Where to state test data in Cucumber

I'm struggling to understand the best place to place test data in Cucumber scenarios. My scenario reads like the following: Scenario: Register member for first time Given I have navigated to new ...
0
votes
1answer
38 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
48 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 { ...
3
votes
1answer
467 views

Unable to launch Safari on iOS using Appium

I am automating some tests a real device (iOS) using Appium and Cucumber. My idea it to do the following steps: Open the app Do some tasks Launch Safari Navigate to a website, lets say google.com ...
0
votes
1answer
38 views

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

I need to take screenshots after each Steps execution and embed them in the results.i have tried in using the "After" method but its capture only the last screen and displaying in the end of the ...
0
votes
4answers
46 views

How can we manage cucumber background information when require hard set data aliases?

Consider a bunch of scenarios grouped into one feature file that all require setting up a valid user, however I do not want to generate such a user dynamically, for example: Background: Creating a ...
0
votes
1answer
49 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 ...
0
votes
3answers
229 views

Use Gherkin syntax for Acceptance Criteria without accompanying BDD tool

Pretty straightforward question: Does anyone have experience writing or consuming Acceptance Criteria written with Gherkin, but doesn't use a BDD tool like Cucumber, Specflow, etc.? Is this method of ...
1
vote
1answer
176 views

CLEAR Method skipped while running the tests

I'm writing automation script for a page in which there is a text box. The scenario is as follows: I click on the text box and enter value which will throw error I clear the text box and add valid ...
0
votes
0answers
84 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
2answers
60 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
378 views

Cucumber Report [closed]

I am not able to generate either a Cucumber report or a pretty html report. Runner Class: @CucumberOptions( features = "src/test/resources/Features", glue= {"stepDefinitions"}, ...
1
vote
1answer
29 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 ...
0
votes
2answers
59 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 ...
0
votes
10answers
19k views

cucumber java.lang.IllegalArgumentException: Not a file or directory:

I'm new to cucumber. I have created a cucumber project but cannot seem to run the project. Every time I do, I get an error: java.lang.IllegalArgumentException: Not a file or directory: Here is how my ...
1
vote
3answers
12k views

Cucumber and TestNG integration

I have a simple question as I am just getting into Test Automation. I want to develop Cucumber smoke tests and acceptance tests as they would be easy to read and understand for my colleagues. ...
0
votes
2answers
328 views

Unable to read the parameter value inside a class using TestNG

To achieve parallel execution, I am updating my existing Junit project to TestNG. The requirement here is to run one scenario in different browsers using TestNG RunnerClass is as follows: import ...
1
vote
0answers
42 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 ...
1
vote
1answer
51 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
93 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&...
2
votes
1answer
2k views

driver.quit() and driver.close() methods are not working inside @AfterTest method

I'm using Selenium using both Java and Cucumber. And I'm curious when I'm using driver.quit() or driver.close() under @AfterTest method, browser won't closed and when I'm using it inside my test step ...
1
vote
2answers
69 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: ...
2
votes
1answer
112 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
36 views

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

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 ...
0
votes
1answer
135 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
501 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.
1
vote
2answers
5k views

Cucumber step definitions in .feature file not highlight

In my project, I create simple feature file in my maven project using cucumber syntax. but IntelliJ IDEA, not highlight steps in feature file and also I cant use ALT+ENTER key to create step ...
7
votes
4answers
1k views

Cucumber + Protractor : What will be good practices to maintain test data in separate file?

I am looking to see if this is possible... I am writing UI tests for web and mobile in Cucumber (using Protractor for web and Appium for mobile) and would like to store login details (email and ...
2
votes
3answers
5k views

Running a Cucumber scenario multiple times as long as a new Test Data set is present in excel

I have a scenario where i need to execute a scenario in a feature file multiple times as long as the Test Data is present in the Excel. Each row of the Excel has a different set of test data. I want ...
0
votes
1answer
58 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 ...
5
votes
4answers
1k views

What is the difference between Given, When and Then annotations in Cucumber?

I do know that basically all Given, When, Then and And keywords in feature definition technically are not distinguished by Cucumber. But why does Cucumber have different annotations for the step ...
5
votes
2answers
10k views

Correct Strategy for Element to be not present in DOM

I have scratching my heads around this problem for two days. I have a test where I need to check if a spinner is not visible to the user. This is the first test of a series of tests, and until the ...
0
votes
2answers
53 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 ...
2
votes
1answer
114 views

Selenium>Cucumber: How can default parameter be limited for steps?

I'm new to Cucumber and want to understand how to use default param in a feature file testcase.feature for example: And User click Delete on task action In the step definition, the params could be ...
1
vote
1answer
48 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
1answer
30 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
17 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, ...
3
votes
4answers
423 views

How to re-run prior Cucumber Step based on boolean assertion in a later step?

I'm learning to use Cucumber and have a Scenario as follows: Given a standard party And a flight from "UK" to "Europe" When I search And I receive search results Then I can book my holiday In Step ...
4
votes
2answers
407 views

Managing repeatable test data when using cucumber and a BDD approach [Java, Selenium]

When dealing with the highest level of the stack, functional end 2 end tests under no isolation, I am writing my selenium driven tests using the cucumber / BDD syntax and running each scenario in ...
1
vote
4answers
455 views

Katalon or Java+Junit+Cucumber to automate tests?

We are starting to automate web tests, but we don't know what is the best way to do, what is the best option to start and why? And what is the best-easy to use for automate Mobile IOS and Android?
3
votes
2answers
2k views

Unable to handle iFrame in Selenium

I'm trying to access iFrame <iframe id="frame1" style="width: 100%; height: 100%; display: block;" tabindex="100"> <html> <head xmlns="http://www.w3.org/1999/xhtml"> ...
0
votes
2answers
1k views

How can I pass parameter in xpath?

I am using Java, Selenium Webdriver and Cucumber for my automation.In my feature file I have below statement : And add a room '<x>' The XML code for selecting rooms is shown in below image : ...
2
votes
0answers
1k views

Can't run tests from Cucumber feature.file (cucumber.runtime.CucumberException:)

I can run my tests from my runner class without any problem. Here is my Runner-class: @RunWith(Cucumber.class) @CucumberOptions( format = {"pretty", "html:target/cucumber"}, glue = {"...