Who doesn’t love a caffeine fix first thing in the morning to wake you up?
I’m one of those people that can’t function until I have a tea or an “extra hot Latte” every morning.
For someone like yourself who has a very busy schedule, you probably haven’t got time to sit around and make a hot beverage.
Since the arrival of coffee machines at home or in the office, its made our life much easier.
Have you ever wondered how these coffee machines are tested?
Lets find out.
In this article, I’ll give you a list of test cases for a coffee machine and as always, my own thoughts and ideas.
Table of Contents
First Things First
If you are totally new to software testing and want to get a gauge of what software testing involves and whether its suitable for you.
Click here for the software testing careers section of the website to read detailed articles based on my experience of working in the industry for two decades.
Secondly, if you want to learn how to write test cases then read that article to give you some solid best practice tips.
How Does a Coffee Machine Work?
Before we get into the test cases, let’s have a brief look at how a coffee machine works.
A coffee machine has three main components: water tank, coffee grinder and boiler.
The water tank is where you pour in the water.
The coffee grinder grinds the beans to the correct consistency and then the boiler heats up the water to create a perfect cup of coffee.
Types of Coffee Machines
Not all coffee machines are made equal.
There are various types of coffee machines available on the market. For example;
- Espresso
- Pod/Capsule
- Milk Frothers
- Nespresso
- Barista style machines
- Filter (drip) coffee machines
- Drip coffee machine.
I don’t want to turn this into a blog post about coffee machines because a) you can do the relevant due diligence and b) its making me want coffee.
However, if it’s your job to test these machines, ensure you know exactly the type of machine you’ll be testing as they have slightly differently functions.
Here is a very handy video from Coffee Kev who breaks this down.
Context of the Test Cases
For the context of this article, we will test a commercial coffee machine, the type that you find in your office. The type that is FREE and no money is required from you.
So a type of automated espresso machine.
We could have also used the pod coffee machine as these are very popular.
I have both a pod and an espresso machine in my office.
In a commercial environment, you want something that be dispensed quickly but also of good quality.
A drip coffee maker for example isn’t a great option since it takes a long time to dispense. You’re more likely to find this in the CEO’s office.
What about a Coffee Vending Machine?
I won’t be covering that in this article.
However, I have written a very detailed article on how to write test cases for a vending machine here.
The underlying principle of how to test is the same.
Rather than dispensing snacks, just replace the items with the type of coffee and you’re good to go.
In the content of this article, there is no payment required.
User Stories and Test Scenarios for a Coffee Machine
Now that we know how a coffee machine works, let’s take a look at some high level test scenarios that you might want to look at.
I’ve tried to put them in the testing levels where I think they fit. You may choose to have them differently but this is a good starting point for you.
Infrastructure Verification Testing
Verify the hardware – For example, are power cables, plugs etc all present?
Does the machine switch on and off?
Also, has the coffee machine built correctly and ready for testing?
In software testing, we can align this to the infrastructure verification testing level where the environment is built ready for applications to be installed.
Functional System Testing
We want to make sure that specific items are working in isolation. For example,
Test Case ID | Test Case Description | Precondition | Expected Result | Post Condition |
CMST0001 | Verify the water tank does not leak: Pour water into the tank and check for any leaks. | The water remains inside the tank and no leaks occur. | ||
CMST0002 | Verify the coffee beans are grinding evenly: Take a test bean and test how evenly it has been ground. | All coffee beans should be consistently be evenly grounded. | ||
CMST0003 | Verify the boiler for heating up the water is to the correct temperature: Boil some water and check to see if it is at the correct temperature. Note: Check the machine specifications as to the desired temperature. | Boiling water temperature is as expected. You can manually verify the temperature with a thermometer to validate that this corroborates with the temperature on the display. |
Functional System Integration Testing
Test Case ID | Test Case Description | Precondition | Expected Result | Post Condition |
CMSIT0001 | Verify end to end test for making a cup of coffee: Pour in coffee grinds, add hot water and test whether or not you get a cup of coffee. | A cup of hot coffee is made and dispensed successfully as per your selection.The last thing you want is a cold brew. | ||
CMSIT0002 | Verify multiple cups of coffee can be dispensed at once: Make more than one cup of coffee and test to see if they are all made correctly. Note: Some machines can dispense more than one coffee at a time. | a) The coffee machine successfully dispenses the selection made in the correct part of the coffee machine. | ||
CMSIT0003 | Cleaning the coffee machine test cases:– Verify the coffee machine for any leaks after cleaning | After an examination, there are no leaks. | ||
CMSIT0004 | Cleaning the coffee machine test cases:– Verify that all parts have been cleaned properly | All parts have been thoroughly cleaned and recorded. | ||
CMSIT0005 | Cleaning the coffee machine test cases:– Verify that there is no water left in the coffee machine | The water tank contains no water.There is not water in any other part of the coffee machines (checks for any leaks) | ||
CMSIT0006 | Cleaning the coffee machine test cases:– Verify that the coffee machine is dry after cleaning | The coffee machine is dry. | ||
CMSIT0007 | Test cups for leakage: Place a cup under the coffee machine and test to see if any coffee leaks out. | Cups do not leak and the coffee is dispensed successfully. | ||
CMSIT0008 | Test overall functionality of the coffee machine: Make a cup of coffee and test to see if it is made correctly. Note: You could potentially use a test like this as a stand up. | The basic functionality of the coffee machine works. |
User Acceptance Testing (UAT) for a Coffee Machine
We need to ensure that our coffee machine is ready for the real world.
You should let your end users create some test cases which they can mimic.
If you have a “premises” or a “facilities” department, they are likely to be the key stakeholder on this project so they should ideally test it from an end user perspective.
So what kind of test cases should they write?
Below are some examples.
Test Case ID | Test Case Description | Precondition | Expected Result | Post Condition |
CMUAT0001 | User wants a small cup of coffee with milk and sugar. | The coffee machine should dispense;coffee for he equivalent a small cup.Coffee that contains milkCoffee that contains sugar.The coffee should look and taste like coffee. |
In a UAT scenario, I prefer to create high level user stories/journeys which have a goal.
It’s then upto the end user how they want to test the application.
Two users might not always take exactly the same steps which I always find fascinating.
Putting it all together in your Test Plan
As a Test Analyst, Lead or Manager, it will be your job to ensure that you put all the tests in a Test plan and then delivering this to your line manager or wider stakeholders.
Wrapping Up
Testing a Coffee Machine is an Important Task.
Just think of how many people will have a better start to their day because of their coffee machines working?
All thanks to you.
Jokes aside, I hope this article was helpful and insightful.
I’m off to make myself an extra hot Latte.