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.
123
questions
33
votes
7
answers
11k
views
What goes in your definition of done (DoD) ?
In agile projects, we use the definition of done to ascertain when to consider a user story to be ready for acceptance (implemented and tested). In the project's DoD we have things like following ...
20
votes
4
answers
12k
views
Screen Play vs Page Object pattern
I've recently stumbled upon Senenity/JS framework which advocates the Screen Play pattern, which was proposed as a better alternative to Page Objects.
What are the key fundamental differences between ...
16
votes
4
answers
5k
views
Documenting Unit Tests
We follow a BDD approach to development, we have our testers creating scenarios from a specification, and these are then given to our developers before any work is started. However, we find that some ...
15
votes
4
answers
12k
views
Does writing "Given" "When" "Then" BDD style test cases scale up to larger, end-to-end scenarios
Traditionally, structured test, especially long scenarios are commonly written in the step, expected, actual format.
Behaviour Driven Design replaces this with the style of "Given", "When" "Then", ...
8
votes
3
answers
596
views
Suggestions for "Selling" TDD, and BDD to sceptical non engineering managers
Let's say you are a developer (specifically, the team lead) and you want to improve the quality of your company's products. Since you cannot change the whole company, you focus on what you and your ...
8
votes
4
answers
9k
views
What are recommended scenarios to use Selenium Tests for?
My company is introducing BDD into our projects. Our customers have differents processes-cases wich also may fork at specific points. It is a mostly long and tedious work to test each case and each ...
7
votes
3
answers
607
views
Behaviour Driven Development with JavaScript
Are there any approaches and tools for driving the development of JavaScript with BDD. I know that I can do this through the UI with tools like Selenium, but is there any tool that can allow this to ...
7
votes
2
answers
544
views
Impacts of BDD on QA Teams
Behavior Driven Development (BDD) approaches such as NSpec seem to bring developers and those that define business specifications closer together. But this has left me trying to figure out how more ...
6
votes
2
answers
325
views
Style of acceptance test cases? (BDD)
I've been struggling a bit when writing test cases. Our team follows a 2 week sprint, and I'm writing acceptance test cases on these user stories.
I've tried the BDD format (Given/When/Then) and it ...
6
votes
2
answers
2k
views
how to implement a given logged in user role through UI automation?
As suggested on StackOverflow I am posting this question here as well.
I am having trouble how to implement the Given step (with SpecFlow for example) of a logged in user role throught Web UI ...
6
votes
1
answer
5k
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@...
6
votes
1
answer
270
views
How to Run tests in parallel with Spinach BDD framework?
Currently in our company we use Spinach as a BDD framework and test runner for our automated acceptance tests. We also use Selenium as a browser driver, Capybara as an additional layer on top of it ...
6
votes
3
answers
1k
views
Measuring feature coverage with BDDs
I'm looking for approaches to measuring feature coverage (however you want to define that), and how BDDs can help (or be a neutral, or even negative factor) in such measurement.
My question is: do ...
5
votes
2
answers
747
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 ...
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 ...
5
votes
2
answers
424
views
BDD living documentation for Product Owners
We have been using BDD in our team for over a year now. The jobs, that run our tests generate a published report in business language, that anyone is available to read.
We find these very useful ...
5
votes
2
answers
726
views
Best Practice: BDD and automated GUI testing for Desktop applications
At my company we are developing a Desktop application and regression after regression we finally decided to implement the acceptance tests in addition to the unit tests.
I am relying on this project ...
5
votes
3
answers
1k
views
BDD in Validation: good tools?
Context: For 2.5 years, I wrote Java-based desktop software at software company A (the supplier). The software also has a server and a web component. The software was custom-built for company B (the ...
4
votes
5
answers
424
views
How do I build a personal project big enough to learn from automated testing it? [closed]
It doesn't come to me, in my head, how I should build a project big enough, like abig software, so I can test it.
I've been reading about testing and I wanna to learn it from zero.
The language that I ...
4
votes
5
answers
229
views
Tie/Wrap a BDD framework around any testing tool
What would be the additional benefits of wrapping a bdd(behavior development design) framework around a proprietary test tool besides the natural language aspect of the test steps?
Any suggestions ...
4
votes
6
answers
4k
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?
4
votes
1
answer
11k
views
Can a scenario have multiple example tables?
I would like to write a gherkin scenario that specifies a table of parameters but represents a test for every combination of values in the table.
For example:
Given I visit <site>
When I enter ...
4
votes
1
answer
327
views
BDD Acceptance Tests feel....short?
So I'm newly adapted to BDD and have been using Cucumber for Test Automation, but I also use the "Gherkin" style for writing acceptance tests (that I will hopefully be able to automate in the future, ...
4
votes
1
answer
272
views
Given When Then - is one 'then' per test acceptable usage?
I don't know if this has a sort review process, but here goes (direct me elsewhere if appropriate)
I have written these tests, and wondered if my use of Given, When and Then was correct.
I ask ...
4
votes
2
answers
237
views
Using BDD approach, am I writing unit tests properly?
We are desperately trying to adopt BDD in our company at the moment and (as usual?) there are lots of questions about the right way to do BDD now.
One of my favorites is the following.
So let's ...
4
votes
1
answer
180
views
How to test baby alarm
We have a Computer Science project consisting of a baby alarm (a sender and a receiver), so when the baby is crying or a loud sound is perceived, an alert is sent to the parent.
I'm interested in how ...
3
votes
6
answers
377
views
Will writing unit tests block developers from coding?
We are about to implement TDD in our software company and we met some serious questions.
As you know, this is the TDD life cycle:
Add a test
Run all tests and see if the new test fails
Write the ...
3
votes
7
answers
788
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 ...
3
votes
3
answers
101
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
2
answers
624
views
BDD / Cucumber - what level of testing can I use it with?
In the past I've used BDD - Cucumber with the Gherkin syntax - for UAT (User Acceptance Testing). Is this the main area of testing for using Cucumber ?
My organization also has the following areas of ...
3
votes
2
answers
923
views
Is it good practice to combine my Test and Prod BDD tests in one Framework?
This question has been bothering me lately, more from the fact that in the past this is something I would never do, yet in the past I wasn't writing BDD tests. Since incorporating SpecFlow into a ...
3
votes
3
answers
1k
views
The best time to run acceptance-tests with Cucumber/selenium?
I want to know, which is the best way to run automated and acceptance tests?
Because now I have two environments, which are develop and qa, but I don't know if the better way to run these tests is ...
3
votes
2
answers
644
views
Behavioral Driven Framework vs Test Driven Development
I am the only QA with 9 developers dealing with about 60 applications using different technologies.
Now I needed to automate our apps. I have written some selenium scripts already but I stopped and ...
3
votes
4
answers
158
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 ...
3
votes
4
answers
2k
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 ...
3
votes
2
answers
131
views
Level of detail in a Scenario - when to stop
Scenario: Installer Link
When user enters "product.company.com" into a web browser
Then a hyperlink is presented to 'ProductSetup.exe'
TODO: There is nothing here about presentation, e.g., ...
3
votes
1
answer
1k
views
BDD SpecFlow w/WatiN test during/after redirect
I have begun to use SpecFlow and WatiN to automate UI tests in IE9, and am encountering a maddening problem which may have nothing do to with either, but hey. I have the following step:
[Then]
public ...
3
votes
2
answers
339
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 ...
3
votes
2
answers
1k
views
BDD & Rest API automation
When I search for BDD and Rest API automation. I get lots of examples where some user scripts a human-readable user story which shows how to use his API. This user calls it BDD.
But BDD based not ...
3
votes
1
answer
3k
views
Is Parallel Testing possible in Cucumber with TestNG?
I am trying to implement Cucumber in my current project with TestNG and I need to execute my script parallely on multiple browsers.
Is Parallel Testing possible in Cucumber? If Yes, Can any one ...
3
votes
3
answers
1k
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 ...
3
votes
1
answer
373
views
BDD Test Plans: Should features be the same User Stories?
So I'm somewhat new to the BDD world. I've been using Cucumber a little bit for automated testing, but I'm unable to automate everything due to general manpower/time restrictions. However, as I write ...
3
votes
0
answers
1k
views
How can I make my solution thread safe for testNG parallel execution?
Background: For quite some time I have ran automated tests using forked JVM processes, this proved quite easy when injecting a driver object using spring, I could simply provide the following:
@Bean(...
3
votes
1
answer
1k
views
Cucumber with Protractor - Multiple Features Not Executed Properly
I have a pretty small POM based project for learning Cucumber with Protractor. I am using TypeScript. I am trying to perform pretty basic actions (clicking on button, clicking on a menu item) on ...
2
votes
4
answers
20k
views
Cucumber: Multiple vs One step definitions file?
Im trying to figure out what the better way to do this is? On one hand separating your step definitions based on the different feature tests is nice for organization (or in case one breaks and you ...
2
votes
2
answers
459
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 ...
2
votes
1
answer
6k
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 ...
2
votes
2
answers
615
views
What is the purpose of splitting a cucumber Step Definition file
As per my understanding, a single step definition file methods can be reused by steps with the same name in other feature files.
then, what is the purpose of splitting a single cucumber Step ...
2
votes
2
answers
133
views
Who provided BDD scenarios to be automated?
In real time project, who provides BDD scenarios (cucumber feature file) to be automated? Is it already provided by the business or QA person has to write it?
2
votes
3
answers
1k
views
Benefits of BDD [closed]
I'm currently working on Agile Project and we have starting to implement BDD as part of it. To do so, I need to present a slide with advantages of BDD. I can see many sites including StackOverflow has ...