Questions tagged [bdd]

In software engineering, behavior-driven development (abbreviated BDD) is a software development process based on test-driven development (TDD).

Filter by
Sorted by
Tagged with
0 votes
0 answers

Login panel .feature (gherkin) file

I think many days ago, I randomly got introduced to cucumber developement, And it seemed like a conventional and interesting principle of software development. At this very time, I'm concentrating on ...
KhodeNima's user avatar
  • 167
2 votes
0 answers

SpecFlow/gherkin code for creating customers

I am new to BDD/Specflow and was wondering if I could get some feedback on my definitions Here is what I have for a simple customer creation feature/command: ...
Matster2's user avatar
4 votes
0 answers

Formatting CSV as a table using BDD

This is the problem: Write a function to create a table from CSV data. The input to the function is a list of strings. Each string is formatted as a CSV record. Here’s an example for a ...
Boolood's user avatar
  • 41
1 vote
2 answers

Two BDD unit tests for an account repository with identical code

I am testing my repository class: interface AccountRepository{ void save(Account account); Optional<Account> findById(Long id); } And when writing ...
Sam's user avatar
  • 179
1 vote
0 answers

Hello, World BDD in Golang

I've tried to do some BDD in Golang using Godog. File Hello.feature: ...
Christian Hujer's user avatar
1 vote
2 answers

Using Specs when testing the process of assigning offers to a customer

I am trying to spruce up my BDD skills using Specflow and Gherkin. Please see the classes below: ...
w0051977's user avatar
  • 713
5 votes
1 answer

Testing the process of assigning offers to a customer

I asked a similar question yesterday, which was criticised because I posted the test without the supporting code. Therefore I deleted the question yesterday as it was not clear enough. I am now ...
w0051977's user avatar
  • 713
3 votes
0 answers

linspace c++ and unit tests in catch BDD

I have implemented matlab's linspace function ...
Gilad's user avatar
  • 5,321
6 votes
1 answer

Generate pieces of an SQL query [closed]

Background I already changed my mind towards the SOLID principles, and am applying them in everything that I create. Now I am reading a lot of articles about TDD and BDD, aiming to begin applying ...
LoRdPMN's user avatar
  • 163
8 votes
1 answer

Javascript FizzBuzz and Behavior-Driven Development Using Mocha and Chai

I am currently getting closely acquainted with Behavior-Driven Development. Could someone tell me how I am doing with the Fizzbuzz program below? I am interested in both improving the JavaScript code ...
MadPhysicist's user avatar
3 votes
0 answers

BDD on Android with Kotlin

I am considering an approach fo BDD tests on Android. The sample app — a simple messenger — has been made in Kotlin, so will be the tests. I ended up with something like this : ...
Gorcyn's user avatar
  • 131
4 votes
1 answer

PHP Vehicle / Event test

I was given a test to write a class that calculates a vehicle's average and expected mileage without using a database or framework. The mileages were to be calculated given some different types of ...
Ben Robey's user avatar
  • 143
2 votes
0 answers

PHPSpec, testing code that uses fluent mock

I've just completed writing a spec for a Doctrine2 repository. The repo contains only one method so far, the spec for which takes in an OAuth Identity token object (that contains an ID that matches up ...
danbroooks's user avatar
4 votes
0 answers

In-memory file system context for the behat PHP BDD testing framework

I wanted to come up with a 'utility' context to enable testing of the file system with behat. Specifically this is aimed at helping with the behavioral testing of php command line applications that ...
Samuel Parkinson's user avatar
3 votes
1 answer

BDD in PHP, Testing search in Wikipedia with Behat and Mink (Selenium2 Driver)

I am trying to learn BDD in PHP with Behat and Mink and I am using Selenium2 driver for the same. The scenario is given on this page and is as follows: ...
Musa Haidari's user avatar
9 votes
2 answers

Using I18n in capybara feature specs

Here I am trying to avoid hardcoding in flash messages by using I18n. Also, I have tried to use a CSS selector for submitting the form to make the tests less brittle (I don't really care that much ...
papirtiger's user avatar
5 votes
2 answers

First time BDD: Testing the same things in both acceptance and unit tests

I just tried BDD for the first time and implemented a simple Semantic Versioning Bumper in Python. The class takes a version string in the format of major.minor.patch (i.e. 3.2.2, where major=3, ...
Fabian's user avatar
  • 153
7 votes
2 answers

Am I implementing BDD correctly?

I'm writing a utility that validates fields. I decided to try my hand at Behaviour Driven Development (BDD). The validator utilises "rules" to determine if field is valid. Three different types of ...
user avatar
2 votes
1 answer

Test for a Rails app

Here's a test from a Rails app I'm working on. I want to know if I'm using describe, let, ...
David West's user avatar
4 votes
3 answers

First BDD/RSpec tests, would like some review regarding idioms, conventions and style

This is my first attempt at BDD and RSpec. I'm more of a C# xUnit kind of guy. I wrote this class while developing a 2D random tile map generator (just for fun). The project is still ongoing. I ...
Gilles's user avatar
  • 347
3 votes
1 answer

BDD tests in PHPUnit

No one in my team knows how to write BDD tests, so I started writing some and it's quite working well. I think the time has come to improve the code quality. This contains a lot of duplicated code ...
Matthias Guenther's user avatar