Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8444067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:18:33+00:00 2026-06-10T09:18:33+00:00

TDD & BDD? Which, Why and How? Can anyone give a good explanation to

  • 0

TDD & BDD? Which, Why and How?

Can anyone give a good explanation to justify “Which”, “Why” and “How” on both?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:18:35+00:00Added an answer on June 10, 2026 at 9:18 am

    TDD is used more for unit testing e.g. testing a method on a class. BDD is used for testing the behaviour of a system e.g. Creating a user, or Sending out new product emails.

    So for TDD you might see something like.

    public void Test()
    {
        // Arrange.
        var sut = new ClassToTest();
    
        // Act.
        int result = sut.SoSomething();
    
        // Assert.
        Assert.Equal(result, 23);
    }
    

    With BDD (depending on the tools you’re using) you tend to see something like this:

    Feature: Add a user
        As a system admin
        In order to give a user access to the site
        I want to create a user account
    
    Scenario: Creating a basic user
        Given I have the user's name
        When I create a new user account
        Then that user can log onto the site
    

    As you can, BDD is testing the behaviour of a system rather then single unit. Here is a very good intro to BDD by Dan North – http://dannorth.net/introducing-bdd/

    I would recommend using TDD when you are building your classes/code and want to testing little bits of it at a time. Use BDD when you want to test more then one of those classes in a test i.e. integration test.

    EDIT:

    With the how side of things, for BDD I would recommend using SpecFlow. This is a popular BDD tool which adds a lot of functionality to Visual Studio for creating feature files (The Feature: stuff I mentioned above) and running and debugging the tests.

    Under the hood SpecFlow can use NUnit or MSTest to generate the tests. Other BDD tools include:

    • MSpec
    • NSpec
    • SpecsFor
    • StoryQ

    and many others I’ve forgotten about right now 🙂 I would suggest you try them out and see which one you prefer.

    For TDD you have many options including:

    • NUNit
    • xUnit
    • MSTest

    A lot of the above tools can installed via NuGet in Visual Studio, which is handy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how can I use TDD with MongoDB as my second database? Thanks Edit: Using
Please note: I am new to TDD & cucumber, so the answer may be
I work in TDD environment and basically I am facing with a dilemma which
How to do TDD/BDD with asp.net 4.0 Web Forms? I have an existing website
Has anyone got a TDD-ish methodology for designing complex WPF xaml components (i.e., ControlTemplates,
I am doing TDD/BDD in Ruby on Rails 3 with Rspec (2.11.0) and FactoryGirl
Starting my journey on TDD with Rspec and having some issues. Can't understand why
first time poster and TDD adopter. :-) I'll be a bit verbose so please
Getting started with TDD and I want to ground up a Repository-driven Model. However,
I have been practicing TDD and (some) XP for a few years now and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.