bdd

BDD on Rails - Is the community more behind Shoulda or RSpec?

For a new application I want to start dabbling in BDD and I'm trying to decide between using RSpec or Thoughtbot's Shoulda. I like the macros that Shoulda uses, and the fact that it doesn't seem to reinvent the way Ruby/Rails does testing, but simply provides an add-on. On the other hand, the macros seem like a bit too much "magic" ins...

Is behaviour driven development about design or analysis?

The more I read about BDD and how it is supposed to be improved TDD the more confusing it all seems to me. I've found quotes from expert that say it's about design, but also from other experts that say it's about analysis. The way I currently see it is this: 1) analysis: BDD from wikipedia The result of object-oriented analysis ...

Eat, Sleep and Breathe Unit Testing/TDD/BDD

I do write unit tests while writing APIs and core functionalities. But I want to be the cool fanboy who eats, sleeps and breathes TDD and BDD. What's the best way to get started with TDD/BDD the right way? Any books, resources, frameworks, best practices? My environment is Java backend with Grails frontend, integrated with several exter...

Dynamic data in Cucumber tables

I have a Cucumber table, one of the fields is a date which I would like to have populated with todays date. Is there a way of doing this without having to hard code todays date into the table? Basically I would like to enter Time.now.strftime("%Y-%m-%d") into the table and not have it break. ...

Are there BDD/TDD tools for developing in VB.NET?

I am responsible for rewriting an internal tool for my company. I am currently reworking the most time consuming step to run faster which should give me time to re-think the design of the application for a full rewrite as the interstitial version will meet the current needs. I really want to take this opportunity to implement this code...

Given -When-Then example with NUnit

Can anybody point me to some resources for Give-When-Then style of testing with NUnit? ...

NCover not covering an assembly?

I am having trouble getting NCover to properly cover a .dll. I have several test projects that use XUnit.NET and SubSpec to execute BDD-style specifications. All but one of these test suites runs perfectly in the version of NCover that comes with TestDriven.NET (1.5.8). However, I have one that refused to profile the actual tested assemb...

BDD both from business level

In my current project I want to use Behavior Driven Development (BDD), on both levels of business requirements application level tasks. Is it all right to wrap (group) my internal BDD specs into my high level specs so clients would see that business requirement is done (all internal specs in that requirement passed) but don't actually s...

TDD/BDD in particular for a Rails application

How granular should one get when using TDD/BDD methods for developing an application? In particular with regards to a Rails application. Would you test for every single field individually and then right the migration that will make it pass? So every field would have it's own migration? What would you actually test against to make sur...

Is there a BDD-style framework that allows multiple inherited behaviours?

Many of our system tests are written in a BDD style, and we make decent use of inherited behaviours to minimise duplication, for example this might be a basic hierarchy for purchase tests. class BehavesLikeSuccessfulPurchase class BehavesLikePurchaseWithValidCreditCard : BehavesLikeSuccessfulPurchase In this case the BehavesLikeSucces...

BDD Top-Down Approach

Hi guys, I'm new in BDD world and I've been in some difficult trying to get the best from top-down approach, strongly recommended by many people. Considering this what would you recommend as a good start point to specify controller's behaviors? I mean, what need to be tested in a CRUD controller scenario for example? Regards, Alex ...

TDD/BDD Rails Cucumber / RSpec duplication

Can someone please clarify using a SIMPLE user story the full slice of what Cucumber would be used for and what RSpec would be used for? I purchased the RSpec book the other day and have been going through it. The author seems to be quite vague at times. What I'm thinking of if the user story is something like (please excuse the synta...

are scenarios/stories the new interface in BDD/TDD?

PHP is somewhat crippled since it doesn't have return types (yet). I need my code to throw an exception when X already exists. I can write this in a scenario, but I'm not able to go from the scenarios to the interface my class should implement. Actually this problem is the same in TDD I guess. There seems more that I can tell through my...

BDD and the location of "when"

I have seen what it seems to me are two approaches to BDD. The difference hinges on the location of the "when": In approach 1 the when is part of the specification: AnEmptyStack.isNoLongerEmptyAfterPush In pure "given when then" terminology this is: "Given an empty stack, when it is pushed, then it is no longer empty." So the "when"...

Which BDD framework for JavaScript do you use?

I'm developing large application using ExtJS framework. Because it grows too fast, I realized that this might be the time to start doing tests. I want to go for BDD technique, I found several BDD frameworks for JavaScript around (Screw.Unit, JSpec, JSSpec), but I'm still not sure which one to choose. There are some articles about this t...

How to install MSpec BDD Framework?

Does anyone know if there is an MSpec installer with R# and/or TestDriven.NET support? ...

Should I mock my model in rails controller tests?

I am finding holes in my coverage because I have been mocking my models in controller examples. When I remove a model's method upon which a controller depends, I do not get a failure. Coming from TDD in statically typed languages, I would always mock dependencies to the object under test that hit the database to increase speed. I would...

Running NBehave plain text scenarious using TD.NET

Is this possible? Actually, any tips about running nbehave tests and integrating them with build server would be appreciated. Maybe there's a good alternatives? ...

BehaveN - passing argument with string type from txt scenario

Playing around with BehaveN This is my scenario Given a new calculator When adding "2" Then the result is 1 Problem is with When part, it receives null as argument. public void when_adding_x1(string x1) { //x1 == null :( throw new PendingException(); } Any ideas what's wrong? ...

ISO public Django apps developed Agile / BDD style with Doctest, Unitests and Selenium

I've found several blog posts where TDD/BDD is explained, but the examples are usually really basic. Usually they are just for Models. I want to see how people are really using BDD in Real Life. I'd love be pointed towards some Django apps that were built test first style so I can learn from them. I know that Rails had many examples, s...