As we already might know, an Ecommerce website consists –or should consist, fundamentally, of four key components:

  • Home page
  • Search Page
  • Shopping Cart
  • Payment Gateway

We will share some common examples on how to design a test case for each of these.

Home page

The home page of Ecommerce websites is commonly full of elements which require thorough testing, since it will be the starting point from where the user is going to explore and learn how to use the site.

Considering elements such as the navigation menu/bar, search box or user account menu, we can derive some test cases from them:

1) Home page basic elements

Steps Expected result
1.1) User browses to website URL Home page is served and displayed. Navigation and user account menus, search box –and its category menu filter, store’s main page block containing all the product categories and page footer containing ‘About us’, ‘Contact’ and ‘Terms of Service’ links display correctly. If a user is signed in, their name will display on the user account menu; else, they will be prompted to sign in.

2) Sign in

Steps Expected result
2.1) User navigates to the Sign in page by selecting the ‘Sign in’ link from the user account menu. Login page is served. ‘User’ and ‘Password’ fields, ‘Sign in’ button and ‘Remember user’ checkbox are enabled.
2.2) User enters login name and password. Preconditions: both, username and password can’t be longer than 12 characters. When clicking the ‘Sign in’ button, the user is logged into the system and redirected to the home page.

Search Page

If we want our customers and website users to find what they want, it’s essential that the search function works properly.

1) Search suggestions

Steps Expected result
1.1) User starts typing in the search box. Preconditions: user is standing on the website home page, search bar is visible. Suggestions matching typed characters start to appear under the search box.
1.2) User types a concrete search (an existent product). Similar or exact coincidences start to appear in the suggestions.
1.3) User selects a coincidence. User is redirected to the search results page. Results are relevant to the search criteria.

2) Search options

Steps Expected result
2.2) User performs a search using the category menu to filter results. Preconditions: user is standing on the website home page, search bar and category menu are visible. Independent of the actual relevance of the results as compared with the terms used for the search criteria, the user is shown results related to the specific category selected in the menu.

Shopping Cart

Clear accounts preserve friendship, says an old saying. And we still want to be friends with our customers, so making sure amounts and sums are correct in the shopping cart is crucial.

1) Add Item to Cart

Steps Expected result
1.1) User selects a product and adds it to the shopping cart by clicking/tapping on the ‘Add to Cart’ button/link. Preconditions: user is either standing on a search results page or on a product page. Item counter shows (x) number of items. Product is correctly added to the cart, and the counter now shows (x + 1) items.

2) Remove Item from Cart

Steps Expected result
2.1) User selects a product from the cart and removes it by clicking/tapping ‘Remove item’ link/button. Preconditions: user is standing inside the shopping cart, the cart has at least 1 item. Item is removed from the cart, the counter now shows (x – 1) items.

3) Redirect to Checkout

Steps Expected result
3.1) User clicks/taps on the ‘Checkout’ link/button. Preconditions: user is standing inside the shopping cart, the cart has at least 1 item and the ‘Checkout’ button is visible. User is redirected to the checkout page. Sum totals for items on cart, taxes and shipping costs are correctly calculated and displayed. Payment methods –as announced– are visible and enabled.

Payment Gateway

Ensuring money and personal data is safely manipulated builds trust in customers, hence the importance of rigorously testing our payment gateway.

1) Choosing Payment Method from Checkout page

Steps Expected result
1.1) User selects payment method. Preconditions: user is standing in the checkout page –ready to place an order. At least one payment method/provider must be configured. Payment method is selected and displays its identity characteristics (e. g.: the last 4 characters of a credit card, etc). ‘Place Order’ button is visible.

Conclusion

We’ve covered, very roughly, examples on how to design possible test cases for an Ecommerce website. Logically, these are almost infinitely extensible. The idea is merely to show how to approach what are considered the most important components of an Ecommerce platform and start building from it.