What is the difference between a TDD and a BDD?
Story: User logging in
As a user
I want to login with my details
So that I can get access to the site
Scenario: User uses wrong password
Given a username "jdoe"
And a password "letmein"
When the user logs in with username and password
Then the login form should be shown again
Tags: tdd bdd unit-testing
Source: By NotMyself as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 2.5
Related code-snippets:
- How can I use combinations of sets as test data?
- How do I unit test persistence?
- Is there any way to test flex application with a build script?
- How can I test untested code?
- Testing a function that throws on failure.
- Unit tests for deep cloning are done. How can they be done?
- What is the best way to unit test code generators?
- Has anyone been successful on SQL 'Storming Procedures'?
- What is the best way to run a unit test in visual studio?
- Test Cases VS Assertion statement in the UK.
- What is the best mock framework for Java?
- How do I unit test ASP.NET MVC action method if the method uses BindingHelperExtensions.UpdateFrom?
- How can I test a method that populates a list from a DataReader?
- How do I unit test data in a database?
- How do you unit test webcontrols?