Search⌘ K
AI Features

Acceptance Test the Shopping Cart (Part II)

Explore acceptance testing for a real-time shopping cart built with Phoenix and Elixir. Understand how to verify cart functionality across multiple servers, handle stock updates, and maintain synchronization between browser tabs. This lesson helps you ensure your shopping cart responds accurately to inventory changes and user actions in a multi-server environment.

We'll cover the following...

Multi-server testing

This scenario will ensure that some of the more complex features of our shopping cart work as expected. We haven’t yet tested how our cart works in a multi-server setup, so we’ll perform this scenario across two servers to ensure that it does work.

Define the test

A shopper is connected to the store and sees that the shoes have already been released. The shopper adds a shoe to their cart, removes it, and adds it again. The shopper opens a second tab and adds another shoe to their cart from the second tab. The shoes sell out from a second server. The shopper sees that their items are sold out, and they remove the items from their cart.

Write steps for the test

  1. Start two servers, application and
...