Lettuce (http://lettuce.it) is a Cucumber-like BDD tool built for Python.
Cucumber (http://cukes.info) was developed by the Ruby community and provides a way to write scenarios in a textual style. By letting our stakeholders read the stories, they can easily discern what the software is expected to do.
This recipe shows how to install Lettuce, write a test story, and then wire it into our shopping cart application to exercise our code.
For this recipe, we will be using the shopping cart application shown at the beginning of this chapter. We also need to install Lettuce and its dependencies.
Install lettuce by typing
pip install lettuce.
In the following steps, we will explore creating ...