0% found this document useful (0 votes)
306 views5 pages

Test Case Template and Examples

The document provides a template for writing test cases with examples. The template includes sections for test case number, name, system and subsystem, designer, date, description, pre-conditions, steps with expected responses, and post-conditions. The examples test changing a PIN in an ATM. Example 1 tests a simple happy path change from 1234 to 5555. Example 2 tests multiple changes and a failure, changing from 1234 to 5555, 6666, and 7777 with a failed confirmation. The summary provides the essential information about the template and examples in under 3 sentences.

Uploaded by

ICON87
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
306 views5 pages

Test Case Template and Examples

The document provides a template for writing test cases with examples. The template includes sections for test case number, name, system and subsystem, designer, date, description, pre-conditions, steps with expected responses, and post-conditions. The examples test changing a PIN in an ATM. Example 1 tests a simple happy path change from 1234 to 5555. Example 2 tests multiple changes and a failure, changing from 1234 to 5555, 6666, and 7777 with a failed confirmation. The summary provides the essential information about the template and examples in under 3 sentences.

Uploaded by

ICON87
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Software Engineering – Dr Ghazy Assassa Page 1 of 5

Software Engineering

Test Case Template


and Examples
Software Engineering – Dr Ghazy Assassa Page 2 of 5

Test Case Template (Doc:T_01)

Test Case #: Test Case Name: Page: 1 of ..


System: Subsystem:
Designed by: Design Date:
Executed by: Execution Date:
Short Description:

Pre-conditions

Step Action Expected System Response Pass/ Comment


Fail
1
2

Post-conditions
Software Engineering – Dr Ghazy Assassa Page 3 of 5

Test Case Example1 (simple test)

Test Case #: 2.2 Test Case Name: Change PIN Page: 1 of 1


System: ATM Subsystem: PIN
Designed by: ABC Design Date: 28/11/2004
Executed by: Execution Date:
Short Description: Test the ATM Change PIN service

Pre-conditions
The user has a valid ATM card - The user has accessed the ATM by placing his ATM card in the machine
The current PIN is 1234
The system displays the main menu

Step Action Expected System Response Pass/ Comment


Fail
1 Click the 'Change PIN' button The system displays a message asking the user to enter the new PIN
2 Enter '5555' The system displays a message asking the user to confirm (re-enter)
the new PIN
3 Re-enter '5555' The system displays a message of successful operation
The system asks the user if he wants to perform other operations
4 Click 'YES' button The system displays the main menu
5 Check post-condition 1

Post-conditions
1. The new PIN '5555' is saved in the database
Software Engineering – Dr Ghazy Assassa Page 4 of 5

Test Case Example2 (complex test may be divided into more than test cases)

Test Case #: 2.3 Test Case Name: Change PIN Page: 1 of 1


System: ATM Subsystem: PIN
Designed by: ABC Design Date: 28/11/2004
Executed by: Execution Date:
Short Description: Test the ATM Change PIN service

Pre-conditions
The user has a valid ATM card - The user has accessed the ATM by placing his ATM card in the machine
The current PIN is 1234
The system displays the main menu

Step Action Expected System Response Pass/ Comment


Fail
1 Click the 'Change PIN' button The system displays a message asking the user to enter the new PIN
2 Enter '5555' The system displays a message asking the user to confirm (re-enter)
the new PIN
3 Re-enter '5555' The system displays a message of successful operation
The system asks the user if he wants to perform other operations
4 Click 'YES' button The system displays the main menu
5 Check post-condition 1
6 Repeat steps 1,2,3 using The system is exited and displays a greeting message asking the
another PIN say '6666' and user to place his ATM card in the machine
click 'NO' button
7 Check post-condition 2
8 Repeat steps 1,2, using The system displays a message asking the user to confirm (re-enter)
another PIN say '7777' the new PIN
9 Enter a wrong confirmation The system displays a message of unsuccessful operation and asks
(say ‘9876’) the user to confirm the correct PIN

10 Re-enter ‘7777’ The system displays a message of successful operation


The system asks the user if he wants to perform other operations
Software Engineering – Dr Ghazy Assassa Page 5 of 5
Click 'NO' button The system is exited and displays a greeting message
Check post-condition 3

Post-conditions
1. The new PIN '5555' is saved in the database
2. The new PIN '6666' is saved in the database
3. The new PIN '7777' is saved in the database

Test happy path


Test also failure condition (step 9)

You might also like