Questions tagged [bdd]

BDD stands for Behavior Driven Development. It is related to, and derived from, TDD (Test Driven Development) and ATDD (Acceptance Test Driven Development). It differs from them in its language, preferring "example", "scenario" or "specification" to "test".

BDD stands for Behavior Driven Development.

It is related to, and derived from, TDD (Test Driven Development) and ATDD (Acceptance Test Driven Development). It differs from them in its language, preferring "example", "scenario" or "specification" to "test".

Unlike TDD, BDD is not focused on functionality but on behavior.

It improves communication between team members and it bridges the gap between non-technical and technical people working on the same project by using a common language. Whereas TDD focuses on "how" to implement the functionality, BDD explains "what" functionality to implement.

BDD is an Agile software development process...

...that encourages collaboration between developers, QA and business participants in a software project.

BDD is also known as...

... (Specification by Example) or (Acceptance Test Driven Development). It is derived from (Test Driven Development). It differs from them in its language, preferring example, scenario or specification to test. The language is intended to encourage questioning and conversation around the scenario or example, as BDD works from an assumption that we don't know enough to write an accurate test in the first place.

Scenario-based BDD tools use a Given / When / Then format to capture and automate the conversations. TDD and mocking tools are commonly used at a class level.

Tag questions about binary decision diagrams with . Tag questions about Microsoft's Business Desktop Deployment, now Microsoft Deployment Toolkit, with .

3390 questions
1
vote
1 answer

Why can't cucumber create step definition of bdd sentences that is end with ')' or '.'?

I can't create step definition of bdd sentences which ends with some punctuation mark. It creates this sentences as 'null' When I search "user X" in search field 'id (username)' And I click on search button @When("null") public void…
Furkan
  • 505
  • 4
  • 12
1
vote
2 answers

"No Tests were found" in Pycharm Professional 2019.1 using Behave

Starting Python BDD, using Behave in pycharm 2019.1 pro. Just started learning Python and Pycharm IDE. Used a basic example to run a feature file with one scenario in it. When I run using Pycharm Terminal, the scenario runs fine. When I do the same…
1
vote
3 answers

How can I get cucumber scenario name without using hooks?

I want to get a scenario name for each scenario to set it as Test name while running it on saucelabs. This test name can be set using MutableCapabilities just before creating webdriver. I'm creating the driver using google Guice @ScenarioScoped,…
CMM
  • 543
  • 4
  • 16
1
vote
2 answers

Mockito BDD - mocking RestRemplate exchange() method

I'm trying to mock a RestTemplate exchange() call with the following code: Test method given(restTemplate.exchange(any(UriComponents.class), any(HttpMethod.class), any(HttpEntity.class), any(StatusResponse.class))) .willReturn(new…
esseara
  • 834
  • 5
  • 27
  • 47
1
vote
2 answers

How to set the severity level in allure report, using pytest-bdd

I am using pytest-bdd with allure to generate the reports, In generated allure report i can see the severity level is NORMAL by default, how can i set the Severity level as i needed.Thanks in advance. Screenshot of allure report
Saibharath
  • 56
  • 1
  • 6
1
vote
1 answer

RSpec view specs for nested models

How would you write a new.html.erb_spec.rb view spec for this relationship. I am stumped. resources :things do resources :reviews end Thank you. Kent
neofetter
  • 3,004
  • 2
  • 26
  • 26
1
vote
1 answer

How to measure code coverage in a webapp through unit and functional tests

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 cucumber to get gherkin features and puppeteer for…
1
vote
1 answer

Cucumber JVM - get reference to all scenarios

is there possibility to get reference to ALL scenarios in Cucumber JVM? Problem: I need to pragmatically count some statistics about scenarios (failed, total count, etc) For failed, I could create @After hook, and bump variable that holds number of…
Matthewek
  • 1,519
  • 2
  • 22
  • 42
1
vote
2 answers

Handling input and output in automation of a functionality?

Let's say that you have to test a new way of getting a sum of two numbers from software and you have to test that functionality and do BDD automation. From below two what would be a better approach for automation (Also why)? 1) Using fixed input and…
1
vote
3 answers

Relationship between Unit Testing & End-to-End (Integration per se) while following BDD

My question is also related to who does what in typical BDD. My understanding, Product owner comes up with User Story (may or may not in Gherkin), QA writes Scenarios for End-to-End testing(in feature files), Dev writes his code (how and where, does…
Anp
  • 47
  • 8
1
vote
2 answers

Converting cucumber data table to list of custom objects where object has fields of 'Collection' type

Let's say there is a step in Cucumber scenario step which uses data table: And I add a new user | firstName | lastName | workEmail | workPhone | userName | assignedRoles | assignedAdvisorCodes | | Steven | Gerrard |…
vitali_li
  • 101
  • 1
  • 2
  • 13
1
vote
1 answer

Retrieve the current test's name within a Mocha test using Typescript

This question is very similar to this one, but has one very significant difference: typescript is used. I'm trying to get current test title from within the mocha test, but since typescript is used this code does not work: import…
shytikov
  • 9,155
  • 8
  • 56
  • 103
1
vote
1 answer

What is the correct BDD approach for writing cucumber data driven scenarios for very large web forms? External data file or multi-column data tables?

Currently, we are testing a web application that has 15+ forms each with an average of 20 fields. Which way would be better considering performance, maintainability and a BDD-focus?
1
vote
3 answers

How to generalize login steps in Selenium Cucumber and avoid repetitive steps in feature file?

I am using Selenium+Cucumber for my automation project and written using Java. I have written a feature file in which I have 4-5 login steps repeated in every scenario. Below are the login lines that are getting repeated in every scenario. Scenario:…
AnOldSoul
  • 4,017
  • 12
  • 57
  • 118
1
vote
2 answers

Cucumber-JVM - @When cannot be resolved to a type

I'm following this tutorial to set up BDD using Cucumber-JVM in a Java project. I've set up the following test file under my src/test/java folder for a Java project that I'm working on in Eclipse: CucumberTest.java package myPackage; import static…
Chris Halcrow
  • 28,994
  • 18
  • 176
  • 206