Test Cases

Test Cases

Test cases are the bread and butter of a test case management platform, it's even in the name! A test case is a singular piece of logic or behavior which can be individually confirmed to be working as expected. Test cases are the building blocks of test runs, and are the most granular level of testing.

Anatomy of a Test Case

Name

The name of a test case should be descriptive of the behavior it is testing. It should be short, but not so short that it is ambiguous. For example, a test case named Login is not descriptive enough, but Login with valid credentials is.

Preconditions

Preconditions are a list of steps that must be completed before the test case can be run. These steps are not part of the test case itself, but are required for the test case to be run. For example, a test case to test the login functionality of a website may have a precondition of User must be registered.

Steps

Steps are the individual steps that make up the test case. Each step has an action and an associated expectation. The action should be a short description of the action that is being performed. The expectation should be a short description of what the expected result of the action is. For example, a step for a login test case may be Enter username and password and click Login, with an expected result of User is logged in and the home page is displayed.