In agile methodologies BDD is usually used. It means that before any development is done a User Story must first be written, which describes, from the point of view of a particular user, a certain piece of functionality. These user stories are then made into acceptance tests before any work on the story begins. Typically these kinds of acceptance tests will simulate a user using the software.
User stories are typically written using the key words "as a xxxx", "given xxx", "when xxx", "then xxx"
Example user story Edit
- As a user
- Given I have a user account
- And I have a number of friends who have posted updates recently
- When I log into facebook
- Then I am able to see the updates from my friends on my news feed
Acceptance testing tools Edit
There are myriads of acceptance testing tools. Often people will write acceptance tests in the same language as the application. With many acceptance test tools they still look like code, and hence are mainly useful to developers. However some testing tools allow the overall flow of the test to be written in plain English (with code underneath), with code underneath it, allowing business people to be able to review and make sense of the tests.
Common tools include:
- Cucumber (typically with underlying code written in Ruby, which is most mature, though other flavours are available)
- ScalaTest (used for unit and integration testing too)
- BHat (PHP)
Learning steps Edit
To help learn more about BDD and acceptance testing you can:
- Take the Berkley SaaS course at https://www.edx.org/course/engineering-software-service-uc-berkeleyx-cs169-1x
- Write some acceptance tests for websites you use with Cucumber and Ruby
- Get involved with helping business analysts to write user stories
- Try out all of this stuff for a personal project!