Business Workflow
A Business Workflow represents a sequence of business operations. For example, to describe the task of transferring funds from one account to another,you could author a workflow that could look something like this:
Transfer funds:
- Check if the current balance is "10000"
- Transfer an amount of "1000" to account "0123456"
- Check that the new balance is "9000"
It is also possible to write the same business workflow as follows:
Transfer funds:
- Click link "My Account"
- Verify field "_act_bal" has value "10000"
- Click link "Transfer Funds"
- Type field "_xfer" value "1000"
- Type field "_dest_act" value "0123456"
- Click button "submit"
- Click link "My Account"
- Verify field "_act_bal" has value "9000"
Though both these examples could be used to test an application, the second example has several issues that are best avoided:
- The scenario cannot be easily understood. It requires a detailed understanding of the interface to figure out what is going on.
- The scenario will have to be modified whenever the user interface changes. This leads to brittle tests that will need a lot of maintenance.
- The individual workflow step are at too low-level to be used meaningfully across other scenarios. They do not convey any business intent.
- In essence the imperative style used in the second example does not convey the business intent, it also makes reuse and maintenance of the test suite difficult.
- Remember a Scenario should represent an end user’s expectation of the behavior of the application.

