Custom Search

Example test case:

         
       

Test Case Name

 

Test Case Description

Step Name

Step Description/Action

Expected Result

 

1. Approve the document by Manager

Document is created by an employee and is sent to manager for approval, manager approves the document.

 

Pre condition: Document is created by employee and sent for manager approval

 

Test Data: Employee and Manager login ID, Password, Document to be approved

Step 1

Login to the system as Manager

Manager login should be successful

 

 

Step 2

Navigate to the document approval screen

Manager document approval screen should display

 

 

 

Step 3

Select the document from the user

Document should be selected for the approval

 

 

 

Step 4

Approve the document

Document should be approved successfully

 

 

 

Step 5

Verify that document status is updated as approved

 

Document status should be approved

 

 

Step 6

Login to the system as Employee

employee login should be successful

 

 

 

 

Step 7

Navigate to the employee document link

 

Employee document link should display

 

 

Step 8

Verify that document is approved and status is updated with approved

 

Document status should be approved

1. Structure of the test case:

1.   Structure of the test case:

 

The main objective of the test is to find defects in the application or system. To achieve this test cases should be written well and should have the below details

 

1.    Test case number

2.    Test case name

3.    Test case description

4.    Pre conditions

5.    Test data/Input data

6.    Step name

7.    Step description/action

8.    Expected result

 

 

Test case number: A unique number to identify the test case

 

Test case name: The name of the test case is summary of the test objective typically written in one line.

 

E.g.  For example, if we take the requirement is like below

 

          "Employee creates a document and the manager can either approve it or reject it."

 

For the above requirement, possible test cases could be

 

          1. Approve the document by manager

          2. Reject the document by manager

       

Test case description: The test case description is generally short description of the test objective written in two or three lines.

 

E.g. For the test case, Approve the document by manager, the description could be as below

 

Document is created by an employee and is sent to manager for approval, manager approves the document.

 

Pre conditions: Pre condition is a condition or predicate that must always be true just prior to the execution of a particular test objective. In other words Pre-Condition is the term itself indicates the Pre existing set of the condition that should be satisfied to perform a particular task.

         

E.g. for the above test case example, pre condition is document should be created by employee and it should be sent for approval

 

Test data/Input data: Test Data are data which have been specifically identified for use in tests. It is the data required to test the test case. Input data is to verify that a given set of input to a given function/program produces some expected result. Input can be valid data or invalid data.

 

E.g. In the above test case example, the test data can be employee user ID and password, manager user ID and password, document details sent for approval, environment details. All this type of data constitutes part of test data/input data.

 

Step Name: The sequences of actions are given a number to test the correct behavior/functionalities, features of an application called step name. It is like Step 1, Step 2 Step 3….etc. It can also be called as order of execution number.

 

Step Description: Simple description of the action performed on the application to get some expected output from this action.

 

Expected Result: It is the expected output from the system or application for the action performed on it.

 

E.g. For the test case in example, below could be the complete test case structure when we put all together

Objective of writing test cases:

1.   Objective of writing test cases:

Objectives behind writing and executing the test cases are:

 

·        Find the defects in software products

·        Verify that the software meets the end user requirements

·        Improve software quality

·        Minimize the maintenance and software support costs

·        Avoid post deployment risks

·        Compliance with quality processes

·        Help management to make software delivery decisions

 

What is a test case:

1.   What is a test case:

 

IEEE Standard 610 (1990) defines test case as follows:

 

"(1) A set of test inputs, execution conditions, and expected results developed for a particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement.

"(2) (IEEE Std 829-1983) Documentation specifying inputs, predicted results, and a set of execution conditions for a test item."

 

In Simple terms the test case can be defined as below:

 

A Test Case is set of preconditions and steps to be followed with input data and expected behavior to validate functionality of a system.

 

In simple words a test case is brief description of what to test and how to test