Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Specification by Example by Gojko Adzic.pdf
Скачиваний:
198
Добавлен:
12.03.2016
Размер:
13.4 Mб
Скачать

Chapter 7 Illustrating using examples

99

Examples should be precise

Good examples help us avoid ambiguities. In order to do that, there must be no room for misunderstanding. Each example should clearly deine the context and how the system should work in a given case and, ideally, describe something we can easily check.

Don’t have yes/no answers in your examples

When: The underlying concept isn’t separately deined

When describing processes, many teams I interviewed oversimpliied examples by using yes/no answers. This can be misleading and give people the false sense that they have shared understanding when they don’t.

For example, TechTalk had this issue when illustrating the requirements for email alerts in a web-based refund system. They had examples of conditions about when to send emails, but they didn’t discuss the email contents. “The customer expected us to include the failing case and the resolution, and we didn’t capture that,” said Gaspar Nagy, a developer who worked on this system.

I ran a speciication workshop for a major investment bank. The team was discussing how payments are routed to different systems. They started by listing examples in a table with conditions on the left and different subsystems on the right, marking the columns yes or no depending on whether the destination receives a transaction or not. Instead of yes/no, I asked them to write down the key attributes of the messages sent to each of the systems. At that point, several interesting cases came up that most of the developers misunderstood. For example, instead of a transaction update, one of the systems was expecting two messages: one to cancel an existing transaction and one to book a new one.

Watch

out for examples that have yes/no answers and try to rewrite them to

more

precise.

You can still leave yes/no in examples as long as the underlying concept is illustrated separately. For example, one set of examples can tell you whether an email is sent or not, while another set of examples illustrates the email’s contents.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]