ArticleslgStudy

computer science

Acceptance test-driven development

Acceptance test-driven development is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Acceptance test-driven development rather than just read about it. In short: Acceptance test–driven development (ATDD) is a development methodology based on communication between the business customers, the developers, and the testers. ATDD encompasses many of the same practices as specification by example (SBE), behavior-driven development (BDD), example-driven development (EDD), and support-driven development also called story test–driven development (SDD).

Key takeaways

  • Acceptance test-driven development belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Acceptance test-driven development to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Acceptance test-driven development from memory before moving on to harder problems.

Reference excerpt

Acceptance test–driven development (ATDD) is a development methodology based on communication between the business customers, the developers, and the testers. ATDD encompasses many of the same practices as specification by example (SBE), behavior-driven development (BDD), example-driven development (EDD), and support-driven development also called story test–driven development (SDD). All these processes aid developers and testers in understanding the customer's needs before implementation and allow customers to be able to converse in their own domain language. ATDD is closely related to test-driven development (TDD). It differs by the emphasis on developer-tester-business customer collaboration. ATDD encompasses acceptance testing, but highlights writing acceptance tests before starting any coding.

Overview Acceptance tests are from the user's point of view – the external view of the system. They examine externally visible effects, such as specifying the correct output of a system given a particular input. Acceptance tests can verify how the state of something changes, such as an order that goes from "paid" to "shipped". They also can check the interactions with interfaces of other systems, such as shared databases or web services. In general, they are implementation independent, although automation of them may not be.

Creation Acceptance tests are created when the requirements are analyzed and prior to coding. They can be developed collaboratively by requirement requester (product owner, business analyst, customer representative, etc.), developer, and tester. Developers implement the system using the acceptance tests. Failing tests provide quick feedback that the requirements are not being met. The tests are specified in business domain terms. The terms then form a ubiquitous language that is shared between the customers, developers, and testers. Tests and requirements are interrelated. A requirement that lacks a test may not be implemented properly. A test that does not refer to a requirement is an unneeded test. An acceptance test that is developed after implementation begins represents a new requirement.

Testing strategy 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. Depending on your test strategy, you may use them in combination with other test types, e.g. lower level Unit tests, Cross-functional testing including usability testing, exploratory testing, and property testing (scaling and security).

Acceptance criteria and tests Acceptance criteria are a description of what would be checked by a test. Given a requirement such as "As a user, I want to check out a book from the library", an acceptance criterion might be, "verify the book is marked as checked out". An acceptance test for this requirement gives the details so that the test can be run with the same effect each time.

Test format Acceptance tests usually follow this form: Given (setup)

A specified state of a system When (trigger)

An action or event occurs Then (verification)

The state of the system has changed or an output has been produced Also, it is possible to add Statements that start with AND in any of the sections below (Given, When, Then).

For the example requirement, the steps could be listed as:

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

User who is registered on the system

When:

User checks out a book

Then:

Book is marked as checked out

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

When:

User checks out another book

Then:

Error occurs

Project acceptance tests In addition to acceptance tests for requirements, acceptance tests can be used on a project as a whole. 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 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".

See also Concordion FitNesse Robot Framework Gauge (software) Cucumber (software)

References

External links Example of automation frameworks

Worked examples

Example 1 — a first encounter with Acceptance test-driven development

Start with the simplest possible case. Write down what Acceptance test-driven development claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Acceptance test-driven development before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Acceptance test-driven development ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Acceptance test-driven development

In research
Acceptance test-driven development appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Acceptance test-driven development in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Acceptance test-driven development is common in secondary-school and first-year university syllabi. It links to neighbouring topics Business analysis, Software development philosophies, Software testing, so understanding it makes those chapters shorter.
In everyday life
Look for Acceptance test-driven development outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Acceptance test-driven development” →

How to study Acceptance test-driven development in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Acceptance test-driven development means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Acceptance test-driven development out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Acceptance test-driven development in simple terms?

Acceptance test–driven development (ATDD) is a development methodology based on communication between the business customers, the developers, and the testers. ATDD encompasses many of the same practices as specification by example (SBE), behavior-driven development (BDD), example-driven development…

Why does Acceptance test-driven development matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Acceptance test-driven development?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Acceptance test-driven development.

Tags

  • Business analysis
  • Software development philosophies
  • Software testing

Keep exploring