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 ...
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 ...
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 { ...
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
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 ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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&...
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
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 ...
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.
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 ...
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
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 ...
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, ...
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 ...
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 ...
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?
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 : ...
0
votes
1answer
57 views

Organisation of Acceptance Tests(Specflow/Cucumber)

Now I'm starting to work more and more with BDD techniques(spec flow and Cucumber), I’m starting to think about the organisation of the projects/solutions I create and ensuring that I future proof it ...
1
vote
0answers
53 views

Runners for cucumber tests

I've reached the point now where we need to get my automated checks running as part of deployment scripts to act as regression tests. I've not done this before and I'm thinking the way I currently ...
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 ...
0
votes
2answers
241 views

Is there any way to validate sql data with cucumber feature file data?

I am using cucumber , Junit , Selenium Web driver and have JDBC connection I have a feature with below scenario Scenario Outline: Fill out the ATS Registration Form When Click on SignUp And ...
1
vote
3answers
2k views

How to reuse existing browser session, instead of opening new windows?

I have a feature file which has many scenarios. When I run, every time it's initializing the new browser.It's performing every scenario in the new browser. I am using @before and @after @Before ...
1
vote
5answers
45 views

Where will the cucumber Then stop?

When I'm doing an end-to-end test by using cucumber, where would the testing flow stop? For example, we have several steps here: I walk into a shop I select some items I pay for them I get my receipt ...
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
0answers
274 views

How to debug a protractor test written in typescript using cucumber?

I have a sample project with my test cases written in protractor in ts. I could not able to debug the ts. package.json "debug": "node --inspect=1337 --debug-brk --nolazy node_modules/cucumber/bin/...
0
votes
1answer
152 views

Can we use java to design specflows?

I am currently learning regarding specflows to design acceptance testing using cucumber, But I am getting information that we can not use java or Java script programming language only .net is ...
0
votes
1answer
399 views

Cucumber - Feature file with page object model approach

I am totally new to cucumber, I am using page object model approach. Let's say I have 3 page and 3 test classes Ex: login Page.java / loginTest.java Registration Page.java/Registration Test.java ...
5
votes
2answers
1k views

Maintenance of cucumber features by non-technical people

I have written a framework containing cucumber steps and their Java implementation using Selenium. They're generic enough for the application so that a user can now write new features using Gherkin ...
0
votes
2answers
500 views

How to clear text field in Appium 1.8.0?

Using appium 1.7.2, my test ran correctly and never had any issue with clearing text field with element.clear. but now since i upgrade my appium to 1.8.0 element.clear seems to stop working. it didn't ...
4
votes
3answers
4k views

What are the pros & cons of BDD testing?

I want to build up automation tests for the software I'm working on as a QA. I don't have much experience in that field, I'm still freshly graduated and I don't know all the good habits behind ...
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"}, ...
0
votes
0answers
201 views

Cucumber JS Step Definitions Coming Incorrect For Scenario Outline

Currently working with the .js port of Cucumber - CucumberJS. I am facing this issue where the scenario outline steps are not coming in the defined step. My Scenario is pretty simple Scenario ...
0
votes
2answers
339 views

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

I have windows 10 and using cucumber version 1.2.5 I have the following in the TestRunner @CucumberOptions( plugin = {"pretty"}, features = {"src/test/resources/features"}) ...
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
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
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 ...
1
vote
3answers
268 views

Jquery: How can I click a button by selecting text inside a button with no id or span

<div class="row" > <button type="submit" class="cl-button cl-button--no cl-column">No</button> <div class="row" > <button type="submit" class="cl-button cl-column">Yes<...