Use Case vs Test Case – What’s the Difference?

“Hey Carl, what’s the difference between use cases and test cases?”

“I’m glad you asked!”  Here it is in a nutshell…

The Use Case is the high level story created by a business analyst or other similar role, often times drawn out in simple pictures, of a feature of the product being developed.  If we were developing a restaurant app, the following use case would be an example.

Use Case

You can see that there are actors and actions in a use case.  The Waiter can ‘Serve Food’ or ‘Pay for Food’.  The Client can ‘Order Food’, or ‘Eat Food’ or ‘Pay for Food’, etc… Use cases describe how the system is intended to work.

With test cases, and we’re talking about the functional/system type of test cases in this context, spell out the specific steps for features described in the use case.  Test cases are created by a test engineer following functional or business specifications with use cases.  With almost all use cases, many test cases are derived.  In the example above, the feature “Client Orders Food’, the following test cases could be created.

Use Case: Client Orders Food

Test Case #1 – Client arrives at restaurant and orders food from waiter
Test Case #2 – Client orders food online before arriving at restaurant
Test Case #3 – Client arrives at restaurant, orders food, receives food, orders food a second time for late arriving guests
Test Case #4 – Client arrives at restaurant, orders drinks from one waiter at the bar, then orders the meal from a different waiter at a table
Test Case #5 – Client orders just coffee at table

Creating Use Cases in your project can have a large positive impact to the Quality of your project!

Carl

Leave a comment