Writing a Sample Test Case


Writing a Sample Test Case...

1) Software Testing Tasks
2) What is Test Case?
3) Test Case Template
4) Write a Sample Test Case
5) Execute the Test Case
------------------------------
1) Software Testing Tasks

Important Tasks in Software Testing are,

i) Understanding the Requirements
ii) Derive Test Scenarios for Test Requirements 
iii) Documenting / Writing Test Cases, and Test Data Collection
iv) Executing Test Cases
v) Reporting Defects if you find any deviation from Expected.
vi) Tracking Defects
vii) Re & Regression Testing and Closing Defects
viii) Evaluating exit Criteria and Test Closure

Note: Regression Testing is Cycle, we conduct regression Testing Cycle 1, Cycle 2...and at end Final Regression. Re & Regression Tests depends on complexity of the application and Strength of the Development Team. 
------------------------------
2) What is Test Case?

A set of input values, execution preconditions, expected results and execution postconditions, developed for a particular objective or test condition, such as to exercise a particular program path or to verify compliance with a specific requirement.
------------------------------
3) Test Case Template

Test Case Template may vary from one company to another, some times one project to another in the same company. If you familiar with anyone Test Case then you can easily write test Cases using any type of Test Case Template.

I am going to introduce a Model Test Case Template,

Sample Test Case Template:

i) Test Case Id: a Unique Name to identify the Test Case

ii) Test Case Title: Title or Name of the Test Case

iii) Module Id:  Name of the main module or sub-module being Tested

iv) Precondition: Status before the Test Case Execution

v) Test Steps: Steps for Executing the Test Case

vi) Test Data: Required Input Data for Executing the Test Case

vii) Expected Result: Expected Result as per Requirements

viii) Post-condition: Status After Test Case Execution

ix) Actual Results: (During & After Test Case Execution)

x) Status: Pass or Fail Status after comparing Expected Results with Actual Results

xi) Comments: (Optional)
------------------------------
Software Test Design
4) Write a Sample Test Case

i) Test Case Id: U_TC_001

ii) Test Case Title: Gmail Login Functionality

iii) Module Id:  User

iv) Precondition: Valid Gmail Id and Password

v) Test Case Steps: 
                            i) Launch the Browser and Navigate to www.Gmail.com
                            ii) Write / Type Valid Gmail ID in the "Edit Box"
                            iii) Click on "Next" Button
                            iv) Write /  Type Valid Password in the Edit Box
                             v) Click on "Sign In" Button

vi) Test Data: 
                   i) Gmail Id: gcr1977
                   ii) Password: gcbannureddy

vii) Expected Result: (* After Test Case Execution)

viii) Post-Condition: User Gmail Page opened with all options like Compose,                                     Delete etc...

ix) Actual Results: (* During Test Case Execution)

x) Status: (* After Test Case Execution)

xi) Comments: 
------------------------------
5) Our Test Case after the Execution

i) Test Case Id: U_TC_001

ii) Test Case Title: Gmail Login Functionality

iii) Module Id:  User

iv) Precondition: Valid Gmail Id and Password

v) Test Case Steps: 
                            i) Launch the Browser and Navigate to www.Gmail.com
                            ii) Write / Type Valid Gmail ID in the "Edit Box"
                            iii) Click on "Next" Button
                            iv) Write /  Type Valid Password in the Edit Box
                             v) Click on "Sign In" Button

vi) Test Data: 
                   i) Gmail Id: gcr1977
                   ii) Password: gcbannureddy

vii) Expected Result: 
                           i) Gmail Home Page is Opened
                           ii) Gmail ID is Entered
                           iii) Another Webpage is opened which gives an option to                                        Enter Password
                           iv) Password is Entered
                            v) User is logged in to Gmail.

viii) Post-Condition: User Gmail Page opened with all options like Compose,                                     Delete etc...

ix) Actual Results: 
                           i) Gmail Home Page Opened
                           ii) Gmail ID Entered
                           iii) Another Webpage opened and It has an option to                                            Enter Password
                           iv) Password Entered
                            v) User logged in to Gmail.

x) Status: 
                 i) Step 1: Pass
                ii) Step 2: Pass
               iii) Step 3: Pass
               iv) Step 4: Pass
                v) Step 5: Pass
                    Test Case: Pass
                     
xi) Comments: Smooth Execution, and Fields also User Friendly
------------------------------
Note 1: You can some fields to this Test Case if required, Ex: Tester's Name, Environment, Date of Creation, Date of Execution etc...

Anyhow Test Case Template may vary form one company to another and one project to another, based scope of the Project usually we can Select Test case Template.  

Note: Usually we write Manual Test Cases in Excel File using our Company prescribed  format, if we use any Test Tool like, ALM, Jira etc... then they provide Test Case temple and User/Tester can document Test Cases, and one more thing some Test Tools provide options to customize the Test Case Template.
------------------------------

3 comments:

quick summary of test cases and quite helpful

Nice information. Very useful.

Nice Sir. Very useful.
Thanks for sharing.

Post a Comment