...

/

Acceptance Test the Shopping Cart (Part I)

Acceptance Test the Shopping Cart (Part I)

Let’s test the functionality of the cart.

Test scenarios

All the code for our shopping cart is in place. We’ll walk through a few different scenarios and ensure the cart works as expected in each. We would be performing these tests incrementally as we build the system, but it’s essential to run through all of the scenarios again when the code is complete.

Our test scenarios revolve around the requirements—we’ll combine multiple requirements into a single scenario to quickly work through our acceptance tests. We won’t test what happens after clicking the purchase button to keep things concise.

Our first scenario will test the add and remove item features.

First scenario

We’ll follow the same pattern outlined in the Section ...