Running a series of story tests showcases your code's expected behavior. We have previously seen in the Writing a testable story with doctest recipe how to build a testable story and have it generate a useful report.
With this recipe, we will see how to use this tactic to string together multiple testable stories to form a testable novel.
For this recipe, we will be using the shopping cart application shown at the beginning of this chapter.
We will also re-use the
BddDocTestRunner defined in this chapter's Writing a testable story with doctest recipe. But we will slightly alter it in the following steps.
With the following steps,we will look at how to write a testable novel: