how to write test cases

How To Write Test Cases – Definition, Advantages, Tips, And Examples

What is test case?

Before learning about how to write test case in software testing, we need to understand the basic definition of the test case. It is a set of actions to validate the functionality is working according to requirements. We have to execute test cases as per the requirements. We also validate one or more system requirements and generate a pass or fail.

Test Case Definition :

Definition – Test case is a step-by-step execution to verify functionality as it is expected. Test cases are basically explained that “How to Test”

Advantages of Test Cases :

1. Designing Test cases help us to attend to details and ensure that the tests are from many views.

2. Test cases are reusable so we can use in the future and anyone can reference them and execute the test.

Tips: How to write test cases

Whenever you design test cases, just remember the below things: Short title

1. A strong description

2. Be clear and concise

3. Include the  expected result

4. Avoid repetition

5. Use Testing Techniques

How to write Test Cases?

There is a standard format for writing Test cases. It is displayed below.

Sr NoElementsDescription
1Test Case IDThe ID of the Test case
2ObjectiveThe summary/objective of the test case.
3RequirementRelated requirements for Test case Id
4PrerequisitesAny preconditions that must be mentioned prior to executing the test.
5Test StepsStep-by-step procedure to execute the test.
6Test DataThe test data are used while executing the test.
7Expected ResultThe expected result of the test.
8Actual ResultThe actual result of the test, It’s to be mentioned after executing the test.
9StatusPass or Fail
10RemarksComments on the test case.
11Created ByThe author name of the Test case
12Date of CreationThe date of creation of the test case.
13Executed ByThe name of the person who executed the test.
14Date of ExecutionThe date of execution of the test.
15Test EnvironmentTest Environments such as Hardware, networks, and Software which the test will be executed.

Example: how to write test cases in manual testing

A example for test cases is displayed below:

test cases examples

Examples of Test Cases

If you are looking for test cases examples in software testing for website elements, website testing, electrical appliances, non-electrical appliances or an interviews then please visit below link.

Test Cases Examples


How to write test cases:-Test cases are really important to measure client expectations. It must be executed to test cases because we can find defects that might be skipped in ad-hoc testing. 

Read more: How to write Test Scenario?

Scroll to Top