Questions tagged [bdd]
In software engineering, behavior-driven development (abbreviated BDD) is a software development process based on test-driven development (TDD).
21
questions
0
votes
0
answers
16
views
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 ...
2
votes
0
answers
39
views
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:
...
4
votes
0
answers
102
views
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 ...
1
vote
2
answers
70
views
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 ...
1
vote
0
answers
212
views
Hello, World BDD in Golang
I've tried to do some BDD in Golang using Godog.
File Hello.feature:
...
1
vote
2
answers
115
views
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:
...
5
votes
1
answer
198
views
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 ...
3
votes
0
answers
291
views
linspace c++ and unit tests in catch BDD
I have implemented matlab's linspace function
...
6
votes
1
answer
190
views
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 ...
8
votes
1
answer
393
views
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 ...
3
votes
0
answers
151
views
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 :
...
4
votes
1
answer
78
views
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 ...
2
votes
0
answers
381
views
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 ...
4
votes
0
answers
268
views
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 ...
3
votes
1
answer
451
views
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:
...
9
votes
2
answers
4k
views
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 ...
5
votes
2
answers
282
views
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, ...
7
votes
2
answers
491
views
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 ...
2
votes
1
answer
200
views
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, ...
4
votes
3
answers
221
views
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 ...
3
votes
1
answer
1k
views
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 ...