Content deleted Content added
improper caps |
Adding short description: "Methodology in software development" |
||
(40 intermediate revisions by 28 users not shown) | |||
Line 1:
{{Short description|Methodology in software development}}
{{Software development process}}
'''Acceptance
</ref> and
ATDD is closely related to [[
== Overview ==
Acceptance tests are from the
=== Creation ===
Acceptance tests are created when the requirements are analyzed and prior to coding.<ref name="Pugh11" /> They can be developed collaboratively by requirement requester (product owner, business analyst, customer representative, etc.), developer, and tester.
=== Testing
Acceptance tests are a part of an overall testing strategy. They are the customer/user oriented tests that demonstrate the business intent of a system.
== Acceptance criteria and tests ==
Acceptance criteria are a description of what would be checked by a test. Given a requirement such as
=== Test format ===▼
▲===Test format===
Acceptance tests usually follow this form:<ref name="Pugh11" />
'''Given (setup)'''
: A specified state of a system
'''When (trigger)'''
:An action or event occurs ▼
:The state of the system has changed or an output has been produced▼
For the example requirement, the steps could be listed as:▼
'''
:Book that has not been checked out ▼
▲: The state of the system has changed or an output has been produced
:User who is registered on the system ▼
Also, it is possible to add Statements that start with '''AND''' in any of the sections below (Given, When, Then).
:User checks out a book ▼
▲For the example requirement, the steps could be listed as:<syntaxhighlight lang="cucumber">
:Book is marked as checked out▼
</syntaxhighlight>
=== Complete test ===▼
▲===Complete test===
The previous steps do not include any specific example data, so that is added to complete the test:
'''Given:'''
: Book that has not been checked out
{| class="wikitable"
|-
! Books
|
|-
| Title || Checked out
Line 58 ⟶ 66:
|}
: User who is registered on the system
{| class="wikitable"
|-
! Users
|-
| Name
|-
|
|}
'''When:'''
: User checks out a book
{| class="wikitable"
Line 77 ⟶ 85:
! Checkout action
|-
| User || Sam || Checks out
|}
'''Then:'''
: Book is marked as checked out
{| class="wikitable"
Line 90 ⟶ 98:
| Title || Checked out || User
|-
| Great book || Yes ||
|}
=== Test examination ===
Examination of the test with specific data usually leads to many questions. For the sample, these might be:
* What if the book is already checked out?
* What if the book does not exist?
* What if the user is not registered on the system?
* Is there a date that the book is due to be checked-in?
* How many books can a user check out?
These questions help illuminate missing or ambiguous requirements. Additional details such as a due-date can be added to the expected result. Other acceptance tests can check that conditions such as attempting to check out a book that is already checked out produces the expected error.
=== Another test example ===
Suppose the business customer wanted a business rule that a user could only check out one book at a time. The following test would demonstrate that:
'''Scenario:'''
Check that checkout business rule is enforced
'''Given:'''
: Book that has been checked out
{| class="wikitable"
|-
! Books
|-
| Title || Checked out || User
Line 123 ⟶ 134:
| Another great book || No
|}
{| class="wikitable"
|-
! Users
|-
| Name
|-
| Sam
Line 134 ⟶ 146:
'''When:'''
: User checks out another book
{| class="wikitable"
Line 140 ⟶ 152:
! Checkout action
|-
| User || Sam || Checks out || Another great book
|}
'''Then:'''
: Error occurs
{| class="wikitable"
Line 157 ⟶ 169:
=== Project acceptance tests ===
In addition to acceptance tests for requirements, acceptance tests can be used on a project as a whole.<ref name="Pugh11" /> For example, if this requirement was part of a library book checkout project, there could be acceptance tests for the whole project. These are often termed [[SMART criteria|SMART objectives]]. An example test is "When the new library system is in production, the users will be able to check books in and out three times as fast as they do today".
Line 164 ⟶ 177:
* [[FitNesse]]
* [[Robot Framework]]
* [[Gauge (software)]]
* [[Cucumber (software)]]
== References ==
{{Reflist}}
== External links ==
* [http://acceptancetestdrivendevelopment.com Example of automation frameworks]
{{DEFAULTSORT:Acceptance test-driven development}}
[[Category:Software development philosophies]]
|