Thursday 13th December 2018,
SQA²

BBT Principle: Determine Contexts Next

Josh Chezum July 6, 2015 BBT - Behavior Based Testing No Comments

123rf-9271380_s

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 the first principle of BBT is ‘Determine Outcomes First‘. These outcomes identify WHAT should be tested. The next step is to determine HOW those outcomes should be tested. 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. A given Outcome may require that one or more behaviors occur. 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.

This approach of identifying the behaviors after the outcomes may seem a bit backwards. It feels more natural to state what steps are required to achieve some goal. This approach allows the Analyst to focus specifically on the desired behaviors, and exclude all other aspects of the application. It also makes test case writing simpler, as it does away with long lists of steps, replacing them with sets of simple 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.

Like this Article? Share it!

About The Author

Leave A Response

You must be logged in to post a comment.