Home > Software Testing Templates > How to write effective Test cases, procedures and definitions

How to write effective Test cases, procedures and definitions

Writing effective test cases is a skill and that can be achieved by some experience and in-depth study of the application on which test cases are being written.

Here I will share some tips on how to write test cases, test case procedures and some basic test case definitions.

What is a test case?
“A test case has components that describes an input, action or event and an expected response, to determine if a feature of an application is working correctly.” Definition by Glossary

There are levels in which each test case will fall in order to avoid duplication efforts.
Level 1: In this level you will write the basic test cases from the available specification and user documentation.
Level 2: This is the practical stage in which writing test cases depend on actual functional and system flow of the application.
Level 3: This is the stage in which you will group some test cases and write a test procedure. Test procedure is nothing but a group of small test cases maximum of 10.
Level 4: Automation of the project. This will minimize human interaction with system and thus QA can focus on current updated functionalities to test rather than remaining busy with regression testing.

So you can observe a systematic growth from no testable item to a Automation suit.

Why we write test cases?
The basic objective of writing test cases is to validate the testing coverage of the application. If you are working in any CMMi company then you will strictly follow test cases standards. So writing test cases brings some sort of standardization and minimizes the ad-hoc approach in testing.

How to write test cases?
Here is a simple test case format

Fields in test cases:

Test case id:
Unit to test:
What to be verified?
Assumptions:
Test data:
Variables and their values
Steps to be executed:
Expected result:
Actual result:
Pass/Fail:
Comments:

So here is a basic format of test case statement:

Verify
Using
[tool name, tag name, dialog, etc]
With [conditions]
To [what is returned, shown, demonstrated]

Verify: Used as the first word of the test case statement.
Using: To identify what is being tested. You can use ‘entering’ or ‘selecting’ here instead of using depending on the situation.

For any application basically you will cover all the types of test cases including functional, negative and boundary value test cases.

Keep in mind while writing test cases that all your test cases should be simple and easy to understand. Don’t write explanations like essays. Be to the point.

Try writing the simple test cases as mentioned in above test case format. Generally I use Excel sheets to write the basic test cases. Use any tool like ‘Test Director’ when you are going to automate those test cases.

Feel free to comment below any query regarding test case writing or execution.

Advertisements
  1. Aarthy.
    May 23, 2008 at 5:22 am

    This was really useful and thanks for that. It would have been still more useful if u would given a life time example. it can be very simple but still by looking at the example every one can understand it so easily. Just an opinion which i thought i could share.
    Thanks

  2. Kavya
    August 23, 2008 at 12:23 pm

    This was very useful.But i want know more about writing test cases.Can you tell one simple testcase for very simple program along with that program?

  3. Ganesh anand
    September 17, 2008 at 1:19 pm

    nice but i need in Detail

  4. Priya
    January 2, 2009 at 10:21 am

    This was very useful.But i want to know more about test cases.Can you tell one simple testcase for very simple program like programs in c or c++ or else in any language

  5. kavitha
    January 12, 2009 at 11:24 pm

    hi this site is very use ful for the new tester like me can you tell me how to write test case on any web site pls show me how to write test case with example
    thanks

  6. April 29, 2009 at 12:58 am

    Good Work! appreciated …

  7. Narender
    May 14, 2009 at 11:25 pm

    how to write test cases for c language programs related to sorting techniques; test cases e.g, for integer variable range.

    • Nigar Sultana Kana
      March 3, 2010 at 3:35 pm

      This is very useful format. But I want to more explanation with a simple scenario.Would you like to write me a simple login page test?
      It will help me more.

  8. vandana
    September 30, 2010 at 11:08 am

    Very useful but i need more information … a simple scenario test plan would be gr8 coz i want to see how it is in the real world

  9. test
    November 1, 2010 at 4:36 pm

    tell ur id… will send

  10. qasim zaman
    November 24, 2010 at 2:35 pm

    please give a suitable example of writing a test case

  11. qasim zaman
    November 24, 2010 at 2:36 pm

    please give a an example of writing a test case

  12. June 27, 2013 at 1:43 pm

    So attractive post, thank you!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: