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
5
votes
2answers
176 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
48 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
61 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
42 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 ...
1
vote
2answers
408 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
41 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
47 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
50 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 ...
1
vote
2answers
383 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
58 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
86 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
47 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
247 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
533 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
133 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
136 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
46 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
178 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
137 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
46 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
62 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
132 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
187 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
310 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
235 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
41 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 ...
1
vote
1answer
98 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
347 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
896 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
65 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
57 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
55 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
43 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
20 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
52 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
647 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
695 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
3answers
4k 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
64 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
65 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
2k 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
339 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 ...
2
votes
3answers
3k 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
46 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 ...
3
votes
5answers
754 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?
1
vote
1answer
314 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
468 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
707 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
6k 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 ...