The SQA2 Blog: BBT - Behavioral Based Testing
There is a certain mindset that is required when working with BBT. It is vital to approach the problem from the destination, and work backwards. That is why Determine Outcomes First is the first principle of BTT. The outcomes identify WHAT to test. The next step is determining HOW to test the outcomes. This leads to the second principle of BBT: Determine Contexts Next.
A context, simply defined, is a unique behavior that is required in order to achieve some outcome. Note that, because this is Behavior Based Testing, it is important to consider only what behaviors are required to achieve an outcome, NOT what specific steps are required. Any given Outcome may require the occurrence of one or more behaviors. By starting with the Outcomes, and then identifying the required behaviors it is possible for an analyst to hone in on the most important aspects of the application under test.
Outcomes then Contexts
Identifying behaviors after the Outcomes seems a bit backwards. It often feels more natural to state the steps required to achieve some goal. However, identifying Contexts after Outcomes allows the analyst to focus specifically on the desired behaviors, excluding all other aspects of the application. It also makes test case writing simpler. It eliminates long lists of steps and replaces them with simple sets of behaviors. Like the other principles, determining the required contexts can take some practice to get right. But, while it can take some time to get into the right mindset, once mastered, the mindset of deriving Contexts after determining the Outcomes will bring a great deal of value to any team implementing BBT.