Questions tagged [bdd]

Behavior driven development (or BDD) is an agile software development technique that encourages collaboration between developers, QA and non-technical or business participants in a software project.

Filter by
Sorted by
Tagged with
0 votes
1 answer
310 views

How can i store a value as global variable from an API response and pass it to another API as parameter in Cucumber feature file using REST assured

I am designing automation scripts on Cucumber BDD framework for REST APIs using Rest assured. I have one api which generates the "Token" and then there is an another api for order create ...
  • 339
0 votes
0 answers
7 views

Display feature name as heading on Cucumber Reports

I am using Cucumber Ruby and publish to Cucumber reports. I want the report to display the feature name rather than the file name in the heading of each file in the output. example.feature Feature: ...
  • 113
-1 votes
1 answer
425 views

can we prioritize test scenario in cucumber feature file during execution?

Login.feature Scenario: log in using valid credential Scenario: log in using invalid credential How can i execute second scenario first
0 votes
1 answer
40 views

One Tests or Multiple Separate Test Automation BDD

How the system works (UI) Registration Form > Redirect to Another Page with Products (based on the submitted in the registration form) (backend) API will check the validity > Valid or not it ...
  • 3
2 votes
2 answers
64 views

Gherkin: When is appropriate to use the 'background'?

My colleague and I are having a debate about when its appropriate to use the 'background' keyword. the test scenario is to confirm that the correct country codes appear when you enter a telephone ...
  • 437
2 votes
5 answers
68 views

How to repeatedly run tests which add the same user to the system

I have the following Gherkin: Scenario: A user can register to the application Given Carlos is not a registered user When Carlos registers on to the application Then he gets registered My ...
3 votes
4 answers
96 views

Can TDD be a tester task?

I'm working in a team developing a web application frontend (using Angular) and backend (using Java). The manager and the team asked me to be in charge of doing TDD (since I am a test automation ...
2 votes
1 answer
60 views

Is Cucumber Scenario equivalent to a Java Class?

@Add User Scenario: Add a new User profile in the System Given user is on the Add User profile page Then Add a new user profile in the system Then verify that user has been added successfully Now, ...
1 vote
1 answer
66 views

Writing behavioural features/scenarios for application with many proccesses and sections

I'm trying to start automation on the web application that I'm currently manually testing. I was suggested to do it using BDD, so I started reseaching about it, and as I started writing my first ...
  • 11
1 vote
2 answers
264 views

What is the difference between BDD automation framework and Keyword driven automation framework?

I am using the Cucumber BDD framework for test automation. I have read articles on keyword-driven which state that keywords such as sign_in are exposed to nonprogrammers and the implementation is ...
  • 23
1 vote
3 answers
119 views

Tests that cannot be automatable in BDD model but can be automatable in TDD model

I have been to a interview. The interviewer said they were using BDD model in their project. He asked me this question. Define some Tests that cannot be automatable in BDD model but can be ...
1 vote
2 answers
519 views

Which runner to use with Specflow Cucumber BDD: Specflow Runner, Nunit, Xunit

I have a Specflow Selenium BDD automation solution in C# using Visual Studio and want to start scheduling some automation runs based on tags and possibly features. I've only used Nunit as a test ...
  • 57
1 vote
2 answers
595 views

Specflow Cucumber BDD - Only log in once on test run not on every scenario

We have a Cucumber BDD test project using C# Specflow. The application is browser based tested using Selenium WebDriver automation framework. There are a number of feature files with scenarios: ...
  • 57
0 votes
2 answers
10k views

How to fix cucumber step does not have matching glue code?

The cucumber feature file has all steps highlighted in yellow and warning is shown as step does not have matching glue code, When I try to run the project as maven test, I am getting null pointer ...
-1 votes
1 answer
84 views

BDD in testing how do you organize your steps?

As the title says I'm trying to implement my tests with BDD but I'm unsure how to structure it correctly. I have a separate folder where I keep my steps. I kinda want it to be one large file because ...
1 vote
1 answer
52 views

The third amigo problem when customer is unknown

BDD is a useful collaboration tool (amongst other purposes). One of the main benefits is the shared language between customers/business analysts, developers, and testers. This is facilitated by the ...
  • 4,079
1 vote
2 answers
177 views

How to introduce BDD to SAFe?

There have been some criticisms of SAFe (Scaled Agile Framework) in this post, including: I think SAFe is not Agile at all and [the business is] not understanding how TDD and BDD work with SAFe's ...
  • 4,079
0 votes
2 answers
404 views

In Gherkin files, should I repeat the steps in the previous scenario if my following scenario depends on it?

I have read about the Cardinal Rule of BDD from various places when writing Gherkin files. In many of these examples, they have the following scenarios in a feature file: Feature: Google Searching ...
  • 141
1 vote
2 answers
5k views

WARNING: Passing multiple tags through @CucumberOptions is deprecated. Please use a single tag expressions?

I tried to run a Cucumber test with multiple tags. But got this error. I am using Cucumber version 5.7.0. How can i run multiple tags now? import org.junit.runner.RunWith; import io.cucumber....
3 votes
2 answers
245 views

API Testing with Specflow BDD Selenium?

I'm developing a BDD test automation solution with C# using Specflow (Cucumber) with tests written as plain text Gherkins. I am currently writing a regression test suite amongst others. When ...
  • 57
4 votes
1 answer
2k views

Cucumber - 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@...
0 votes
1 answer
6k views

Problem with finding element with Selenium and Xpath

I have a problem that is very strange for me because the code that I wrote, I am quite sure should work! Config Details Chrome version: 80.0.3987.132 ChromeDrivers version: same as ...
1 vote
1 answer
952 views

Is there any posibillity to run test in specific order with pytest bdd

For mobile testing automation I'm using appium, pytest-bdd and allure. Application has multiple functions. To use it user must be logged in. Process to test is next: Scenario to authenticate - 2 ...
  • 43
0 votes
1 answer
69 views

In Visual Studio 2019, The Name Of The Scenario In Test Explorer Is Different From The Test That I Want To Run

The test scenario in Test Explorer is different from what I have in my V/S Project. I have tried re-starting Test Explorer to no effect. Thanks !
  • 515
2 votes
2 answers
2k views

Specflow step is not bound even though the underlying step definitions have been implemented

Hello, the step has not been bound (hence, colour purple), even though the underlying step defintions have been implemented. In the screen shot, I clicked on "Ok". V/Studio takes me to the screen in ...
  • 515
3 votes
3 answers
95 views

Should scenarios be short or complete?

Assuming the following scenario: Scenario: A not logged in user must be able to register Given a non-logged in user When filling the registration form with full name Pepe Roni, email peperono@...
-3 votes
1 answer
58 views

How can i use driver.findelement for All Steps [duplicate]

I need to call google in a test case and with google open enter the information in the fields. Take a look at my code: import cucumber.api.PendingException; import cucumber.api.java.es.Dado; import ...
1 vote
1 answer
290 views

How do I make my variables available to all steps of my tests

I'm using data faker and I would like to know how to make my variables available in all steps of my test. I wanted to leave all elements mapped in the initial step, or be given WebDriver driver = ...
0 votes
2 answers
60 views

Writing Better Stubs To Local Behaviour Testing

I have recently faced an embarrassing bug in PPE and want to improve my testing strategy so that I can mitigate such bugs in future during local testing itself. I have an API that interacts with a ...
0 votes
2 answers
162 views

JBehave - large number of steps in a scenario, due to preconditions and pre-steps

I'm having a scenario which consists of around 500 steps. About 490 steps out of the it are preconditions and steps that needs to be done, in order to come to a state where the actual acceptance (...
  • 121
2 votes
1 answer
53 views

BDD Given - How do you set the starting page?

Given user is currently at Login page With the Given above it would be invalid if I include the actual navigation to login page in the step definition simply because navigating to a page is an action ...
  • 121
5 votes
2 answers
596 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 ...
  • 121
0 votes
4 answers
173 views

Customers can almost never submit or monitor bug reports or otherwise communicate with development, even indirectly. Why?

This is "a site for software quality control experts..." Why do most software-based companies seem to have a wall to prevent customers from submitting or monitoring bug reports, via support or ...
1 vote
1 answer
812 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 ...
  • 4,079
1 vote
1 answer
147 views

Code coverage in react webapp

I'm a little bit stuck with a task that I have been researching. It's about code coverage in a react webapp. I implemented a few unit tests using jest + enzyme. also some functional test, using ...
1 vote
1 answer
376 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 ...
2 votes
1 answer
76 views

BDD features for dependent applications

Say, if an application has both admin console(admin user only) and user consoles(end user) and a course of action in admin console will be reflected in user console. So, even though the goal is ...
  • 31
1 vote
1 answer
39 views

BDD Feature Files guidelines

I'm sure every story cannot be considered as a feature and a feature can be mapped to multiple stories. Sometimes big stories are split into multiple stories for easy reference. Are there any ...
  • 31
2 votes
3 answers
222 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
1 answer
56 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 ...
  • 103
0 votes
1 answer
57 views

How much to separate functional tests?

For example I have a simple on-line shop. The user can add a product with and without tags. I would like to test it functionally. My first test: Generate sample data to database (User) User login ...
  • 1
3 votes
4 answers
1k 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 ...
  • 373
3 votes
7 answers
557 views

Using BDD to describe complex interactions in a state machine

How would you use BDD to describe complex interactions with a state machine? For example consider this scenario: User enters input into the system. The system transitions into state A. The user ...
  • 131
0 votes
3 answers
24k 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
1 answer
106 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 ...
3 votes
6 answers
3k 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?
5 votes
3 answers
11k 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 ...
  • 437
2 votes
2 answers
305 views

Benefits of BDD tools such as SpecFlow for tech debt in automation

We are starting to automate our manual regression suites using Selenium Webdriver and NUnit. The tests we will be automating are quite detailed in terms of steps and expected results however I was ...
  • 67
1 vote
3 answers
1k 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<...
0 votes
1 answer
1k views

No Option To "Generate Step Definitions" In Specflow

I do not see the option to "generate step definitions" in Specflow. I have installed the Specflow add-on by going to: Tools >> Extensions And Updates I have also added NUnit3 Test Adapter. ...
  • 515