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.




Related Posts:

  • Software Testing Help: Best software testing articles of 2007
  • White box testing: Need, Skill required and Limitations
  • What you need to know about BVT (Build Verification Testing)
  • What is actual testing process in practical or company environment?
  • How to write software Testing Weekly Status Report
  • 96 comments ↓

    #1 Nikhil on 07.28.07 at 12:02 pm

    Thanks vijay for this template. Can u please tell that is there need of writing the test cases in exactly the same format like verify, using, with, to format?

    #2 What is white box testing? Need and limitations of White box or glass box testing on 08.07.07 at 5:25 pm

    […] Required: We need to write test cases that ensure the complete coverage of the program logic. For this we need to know the program well […]

    #3 shalaka on 09.10.07 at 8:10 am

    what is volume testing,load testing and stress testing ?
    how can we distinguish between them?

    #4 Kiran on 09.11.07 at 7:40 am

    Hi all,
    I want QTP interviw tips can any one help me pls…..

    #5 A.Manjula on 09.13.07 at 7:30 am

    i want software testing interview questions with answers

    #6 rose on 10.23.07 at 4:00 pm

    Hi Vijay,

    This website topics are really helpful.Keep writing!!

    #7 Rajani on 11.06.07 at 4:39 am

    hi vijay
    recently asked interview question: what do u mean by quality output? plz tell us the ans

    #8 David on 12.18.07 at 7:17 am

    Hi Vijay
    can u tell me difference between Load testing,Performance testing,Volume testing and stress testing.

    Difference between sanity testing and smoke testing

    #9 Prasad on 12.20.07 at 12:25 pm

    What do we actually test in Sanity Testing?

    #10 renukanaragam on 12.20.07 at 4:29 pm

    hi,
    what do we actually test in sanity test?

    #11 Venkat on 01.09.08 at 9:18 am

    HI vijay, pleaes tell me that wat is a testing cycle, i mean the testing carried out that thing and how many cycles can we test for a application

    #12 venkatesh on 01.28.08 at 11:22 am

    hi,
    can u give some sample test cases for web based testing.

    #13 Tips to design test data before executing your test cases on 01.29.08 at 8:04 am

    […] you don’t have the systematic approach for building test data while writing and executing test cases then there are chances of missing some important test cases. Tester can’t justify any bug saying […]

    #14 balu on 01.30.08 at 10:31 am

    Is Getcontent, Getitemcount commands applicable for the web applications or not? Please tell me.

    #15 Jagadeesh on 02.05.08 at 8:16 am

    Hi all,

    I am Jagadeeswaran

    I need sample test case, test data and test plan. Please send to my mail is anybody is having. thank you….

    #16 Jagadeesh on 02.05.08 at 8:18 am

    Hi all

    I need some information about testing.
    Shall we need any coding knowledge for the manual testing. SQL Query using for which testing

    #17 vinay on 02.14.08 at 7:24 am

    Hi,
    Coding knowledge is not required in Manual test, we should have good functional knowledge of application.
    SQL querys are used in Database testing.

    #18 suneetha on 02.15.08 at 8:21 am

    hi

    i want some testcases for web based insurance company.
    please kindly provide me.
    what r the real ti me questions for qtp tester.

    #19 hemadri on 02.18.08 at 11:46 am

    hi vijay
    can u give some sample test cases for email address

    #20 ANU on 02.19.08 at 11:42 pm

    Hi vijay,

    Thanks, I like this web site ,it is very useful .who want get itto this testing feild, it is giving self confidence.I am a Bcom graduate in 1996. I did testing course .I want to apply for the job without experience,will they call me?Is it easy to get job.

    #21 sowmya on 02.26.08 at 7:32 am

    Hi Vijay
    Thanks…the web site is quite interesting.
    but will be more helpful if u provide some test documents like test plan,test case,test report etc with a sample example or real time application.

    #22 Nisha on 02.26.08 at 8:26 am

    Whether testers come under qc or qa

    #23 Tarannum on 03.11.08 at 5:26 am

    Can you please provide me with some testcases for web based insurance company.

    #24 sowmya on 03.13.08 at 12:03 pm

    pls provide some test cases for health care system

    #25 White box testing: Need, Skill required and Limitations « Thiyagarajan Veluchamy’s Blog on 03.14.08 at 3:50 pm

    […] Required: We need to write test cases that ensure the complete coverage of the program logic. For this we need to know the program well […]

    #26 Bibhu on 03.17.08 at 12:39 pm

    lets say an application is capable of running in 40gb harddisk ,1gb ram & P4 processor…you have to run that application in 20gb hard disk,256mb ram & p1 processor, then this testing is called as???

    #27 Gaurav Sharma on 03.17.08 at 6:46 pm

    it’s a gud artical…i just want to know “wht standards we use to write test cases?”

    #28 swetha on 03.18.08 at 6:56 am

    Is it possible to write test cases for Whie Box Testing?Is there any format to be followed..

    #29 RahulKumar on 03.18.08 at 10:42 am

    @ swetha
    Generally white box testing performed by Developer,who doest use any fixed Tst case since these person know the application well so no need of test case for testing..
    Cheers!!!
    RahulKumar

    #30 RahulKumar on 03.18.08 at 10:45 am

    @Tarannum ,@Soumaya
    I think test case are specific to the the application its not generic.We need to have firm grip on application and we just need to write test case by own.
    Cheers!!!
    RahulKumar

    #31 RahulKumar on 03.18.08 at 10:50 am

    @hemadri
    Sample test case for Valid email
    {\_ .}[aA-zZ]+||[0-9]+{_}{.}
    this meta language allows user to enter any comnination of alphabet including numbers as well as period& underscorfe leaving period& underscorfe at the 1st place

    Cheers!!
    RahulKuamr

    #32 Sriram on 03.18.08 at 10:56 am

    Dear Bibhu,
    That is called Compatibility Testing.

    #33 sujatha on 03.31.08 at 9:21 am

    shall i get a model document for writing test cases?

    #34 nisha on 04.03.08 at 2:48 pm

    what are the widely accepted testing certifications. Can u provide the site details. i had two yrs of experience in manual testing.

    #35 prashant katkar on 04.07.08 at 9:35 pm

    hi nisha

    ifu want then go this side www.istqb.com

    i hope what u want u geted o byyyyyyyyyyy
    tk cr & best of luck

    #36 Sriram on 04.08.08 at 5:08 am

    Dear Nisha n Prashant the url is www.istqb.org
    and ISTQB Certifications is better.

    #37 manoj on 04.22.08 at 3:58 am

    Can anybody help me out with game testing…or can anybody mail the used cases on game testing pls………….badly in need of the know how of the process

    #38 swarna on 04.22.08 at 9:20 pm

    what are the tasks of manual tester in a company please explain right from the scratch.who does smoke testing,regression testing,system testing,integration testing does a manual tester gets involved in the above testing activites?

    #39 Ujjan on 04.25.08 at 6:02 am

    I m beginer in testing. I am not learining in any institute. I am working in a company frm 4 years as conversion. Now i changed my field to testing.
    Can u give some simple testing advice how to learn frm begining.
    What to do ?
    I dont no to explain to my colauge.
    plz provide some advice.

    thank u.
    ujjan

    #40 Ruchi on 04.25.08 at 7:38 am

    Hi can u pls provide me with a sample test case , a perfect sample with all inputs, explantion, actual and expected result pls i’m in need of it. Be it on login form or anything.
    Pls help me out.
    Thx.

    #41 rahul on 04.25.08 at 8:54 am

    @Ruchi
    for login
    preconditoon–require page shd open…
    1>varify lofin link
    2>varift input for username box
    3>chck for null,blank data
    4>varify pwdbox it shd be encrapted
    5>vatify submit button
    6>varify log out
    7>and there are many more..
    but TL shd approve before executing the,.
    for more info ping me back a@ rahulkumarbangalore@yahoo.co.in

    #42 rahul on 04.25.08 at 8:57 am

    @swarna
    see swarna its all depands on com to com..
    br generally tester is involved in smoke,& regression
    integration and accepentence taken care by tester only but onsite takes care of this..
    u shd not confuse urslf since all done by tester only but by different tester…
    for more info ping me back a@ rahulkumarbangalore@yahoo.co.i

    #43 Miffy on 04.25.08 at 11:27 am

    I have come across the term ‘yellow box testing’.i would to like to know the procedures to perform this kind of testing.Is it similar to gray box testing?

    #44 danny on 04.26.08 at 6:21 am

    i want some testcases for analysis strategy of player in soccer.Which type of testing is used.
    please kindly provide me.

    #45 Aparna on 05.08.08 at 7:06 am

    Pls. give me anyone standard flow of writing test cases with any example,pls it’s very urgent.
    This is my email ID aparna_rangari@rediffmail.com

    #46 VijayD on 05.08.08 at 7:18 am

    @Aparna,

    Check your email for the Sample Test Case which may help you.

    Regards,
    VijayD

    #47 Priya on 05.10.08 at 10:16 am

    What are the scenarios for sending invitation to a friend or adding a friend in our buddy list?

    #48 Priya on 05.10.08 at 10:17 am

    What are the scenarios for sending invitation to a friend or adding a friend in our buddy list? Plz reply

    #49 julie on 05.18.08 at 5:45 pm

    hi all,wats the defference between bugs,defects,n error….

    #50 julie on 05.18.08 at 5:50 pm

    hi..can u give us clear pictorial representation of testcases….which will be table formate

    #51 rashmi on 05.20.08 at 6:02 am

    Hi,
    Can u tell us how write an test cases for an existing application

    #52 srikanth on 05.20.08 at 9:05 am

    @ Julie- Error : Deviation for actual and the expected/theoritical value .

    Bug : An Error found in the development environment before the product is shipped to the customer .

    Defect : An Error found in the product itself after it is shipped to the customer.

    For Testcase Template check the link :
    http://www.softwaretestingsuck.....mplate.doc

    @Rashmi-
    I wonder we can do testing on Existing Applications only . If the application doesn’t exist how come we do Testing.
    I think you are about to ask some think like this.. ” How to write Testcases for
    Make it clear about your question…

    #53 Nimesh on 05.20.08 at 9:56 am

    Thanks vijay for this template. Can u please tell that is there need of writing the test cases in exactly the same format like verify, using, with, to format?

    #54 saurabh on 05.22.08 at 12:52 pm

    can anybody tell me which are the most important questions regarding software testing??

    #55 anita on 06.02.08 at 10:59 am

    how to define the complexitiy of a testcase
    what is it that makes a tetcase simple or complex

    #56 Vijay on 06.02.08 at 11:24 am

    @anita
    Test cases should be understandable by a third party have no knowledge of the application to excecute testing. This is the widly acceptable criteria for making a test case and we cas say it should be legible and easy to understand…

    #57 selvam on 06.11.08 at 1:58 pm

    Hi Friends,

    Currently i am working in Non-IT field and planned to switch my career to testing.I had learned the basics of testing,and now i am very eager to learn testing practically with real time projects.
    If any one interested to teach testing personally with real time projects , i will be more grateful, or else show me the right place in chennai.
    Thanks & regards
    selvam.ba@rediffmail.com

    #58 siva on 06.13.08 at 6:53 am

    I am new to QTP, i want to learn it as soon as possible, please help me out to learn this tool, it will be very useful for me.

    #59 suresh on 06.14.08 at 12:01 pm

    pls any one send sample test case to me
    sure_gs2000@yahoo.com, this is my mail id.this is suresh.

    #60 Siva on 06.18.08 at 5:43 am

    hi am siva,
    i want a sample test case with example,
    can anyone pls help me out..
    my mail id g.sivasu@gmail.com

    Regards,
    siva

    #61 Tiger2K on 06.18.08 at 6:21 am

    Dear Suresh & Siva,
    I have send you a sample test cases , check it out and if you have any doubts let me know.

    My e-mail id : lonegladiator@gmail.com

    Regards,
    Tiger2K

    #62 Mallikarjun on 06.26.08 at 3:30 am

    Hello Nisha,
    s/w test engg comes under Quality Control

    #63 neha on 06.26.08 at 6:25 am

    hi
    plz send me 10 cases of testing for yahoo compose mail,its urgent .i need it for my interview.on its basis company will select me.on monday i hav my interview.so plz help me.i’ll be thanful to u.

    my email id: neha_sheokand11@yahoo.co.in

    #64 Tiger2K on 06.26.08 at 7:28 am

    Hi Neha,
    Check your e-mail, i have send you the test cases

    Hope you get this job :)

    Best of Luck,

    Regards,
    Tiger2K

    #65 Abhishek on 06.26.08 at 8:50 am

    Dear shriram,
    i wanna ask that stress testing and Compatibility Testing are same or not? (in reference of question asked by Bibhu.)
    plz clear my confusion.

    #66 rajatha on 06.26.08 at 9:39 am

    hi all,
    i have a question asked in interview.
    its like this,
    how do you rate yourself in manual testing.
    i told 7 out of 10.
    then interviewer asked me why 7?
    i think the answer i gave was foolish answer and he was not satisfied and i answered for rest all questions.

    please tell me what was i suppose to answer for such questions?

    #67 Tiger2K on 06.26.08 at 9:56 am

    Hi Rajatha,
    The answer which you gave was perfect. 7 is a pretty good rating.No one can say 10 out of 10 because no one is perfect. we all tend to do mistake somewhere
    are another.
    More over in regards to manual testing, their is always scope for improvement and learning.
    so the remaining 3 points which you did not give for yourself is actually your improvement
    and learning points, which you will ponder as the time goes on.I personally think u gave the right answer. if the interview got goofed up. it should be
    for something else or maybe your luck . but certainly not for that answer.

    Regards,
    Tiger2k

    #68 rajatha on 06.26.08 at 10:12 am

    hi tiger,

    very glad to see your immediate response.
    actually when he asked why only 7, for that i said still i need to get more exposure in manual testing. again he asked like what in that sense still what you have to learn in manual testing?
    i said after becoming bit comfortable in manual testing then i want to into automation side like that i continued then he did not satisfied it seems he interrupted and moved to another question.

    #69 Tiger2K on 06.26.08 at 10:39 am

    Hi Rajatha,
    Your answer was right, but the way you put across may not have gone well with him\her.

    Check the difference this sentences make :

    Your sentence :”actually when he asked why only 7, for that i said still i need to get more exposure in manual testing.”

    Better way : ” I think learning never ends, so everyday i learn from whatever i do and feel that their is certainly a scope for improvement. i set myself very high standards that is why i am never satisfied and try to do better. so i wont give full points for myself, then
    their wont be any scope for improvement” smile a little after this sentence.

    This sentence can change the whole course of your conversation.

    Simple things, you indirectly saying to him that my 7 rating is equavelent to any normal person
    10 rating. because ur targets are higher than common candidates and you tend to improve
    and you learn continously.

    Do you know what is the difference between briyani sold on road side shop and five star hotel.
    very simple. the way it is presented. that is how they are different.

    This is once again my persception. its not a testing question. so cant give a specific answer for it.
    but i am sure, if i would have been the interviewer. i would have asked when do like to join our join after this answer :)

    Regards,
    Tiger2K

    #70 Tiger2K on 06.26.08 at 10:50 am

    Rajatha,
    Dont misunderstand my example of road side shop and five star hotel.
    i was not referring your answer. but i am giving a generic example of the importance of presentation and choice of words.

    Hope u understand what i was intending to convey

    Regards,
    Tiger2K

    #71 rajatha on 06.26.08 at 11:13 am

    thanks a lot Tiger,

    your answer is very useful.
    i will answer in the same way in my next interview when i asked this question.
    thank you again.

    thats why i thought i answered correctly except for few general questions, why i did not get any feedback till now.

    though we are technically good, we do mistakes like this.

    but now i got my mistake.

    one more question for that also i could not give proper answer

    question is like this,

    i mentioned OS as Windows 2000/XP in my profile.

    interviewer : why you mentioned like this.
    me : i tested this application in these platforms.
    interviewer : then what is the difference that you found while testing in these 2 OS.

    i did not give proper answer,

    please tell me Tiger what i should answer for such questions.

    general question :

    being a test engineer we need to have good communication skill.
    how to learn to put across our ideas in a perfect and impressive way.

    how to get to know to express our ideas like how you explained.

    please tell me.

    thanks a lot,

    #72 Srikanth on 06.26.08 at 11:32 am

    @rajatha :
    You mentioned like Windows 2000/XP in your profile.
    You can justify your answer like this.
    In general in Testing, you may come across some situations that you need to Test your Application on Different Platforms and Supporting Environment.
    In Real customers may use our application/product in their environment, hence you need to assure that your product/application works perfectly with their environment.
    Ping me back if you need more information.

    Srikanth
    Testing Analyst

    #73 sashi on 06.27.08 at 9:54 am

    hi rajatha
    In some situations we have to test our application in different os platform that is also one type of requirement i.e., customer wants to use his application on two different os, at that time we have to test the application in two os environment.

    i think this is enough for u if u have any doubts send me to my mail id gsreddy50@gmail.com

    #74 gsreddy on 06.27.08 at 10:01 am

    hi all i am new to testing i want some help from u r s .if u have any notes on web testing & example test cases
    please send me to my mail id gsreddy786@gmail.com

    i am always thankful to them who sent me the notes

    #75 Tiger2K on 06.27.08 at 10:27 am

    Hi Rajatha,
    I am really not sure what was the intent of interviewer to ask about the OS. because ur not testing the OS your were testing the application.
    If you have mentioned in your resume that you have tested this application on 2 different OS then his question makes sense. because then the question is why did you test the application on 2 different OS.
    what is the need to test the application on 2 different OS.

    About the communication part rajatha, well yes i always belived in a professional environment communication is a must. their are N number of people in the industry, who simply dont talk. They are technical sound but that is not the only thing which will allow you to grow. no one know their existance their knowledge.
    they just come to office. open the mail box and do whatever work is allocation to them, they dont explore. they dont question. this way talent is wasted and that actually affect the person also. no one recognise them since they dont do anything special. just do whatever is given to them. communication will only grow if you talk.

    Regards,
    Tiger2K

    #76 rajatha on 06.27.08 at 11:10 am

    thanks Tiger,

    by the way, is it true that we shouldn’t follow up regarding our interview feedback. everyone says we lose our prestige i mean being experienced we shouldn’t do follow ups.

    so by keep on discussing with the peers and we should always try to use technical terms while discussing, so then only automatically will improve our communication wright.

    thank you again..

    #77 Sajani on 06.27.08 at 12:15 pm

    Hi,

    Even i too got the same doubt what Rajatha got…shouldn’t we follow up on the status or feedback of the interview?

    #78 Tiger2K on 06.27.08 at 2:59 pm

    HI GS Reddy,
    I have send you the sample test cases. check it out and if you have doubts let me know.

    Rajatha and Sajani, if you have any doubts regarding this topic e-mail me to lonegladiator@gmail.com let us discuss.

    Regards,
    Tiger2K

    #79 Tiger2K on 06.27.08 at 3:10 pm

    Rajatha and Sajani,
    Yes, you should follow up on the status or feedback of the interview.
    Reason being that u know where you went wrong. only then you can correct yourself. i dont see any prestige issue coming into play here.
    Asking doubts does not make any one small it actually sends a statement to others that your interested in learning.
    I dont see any thing wrong in asking for feedback of the interview. its another thing that the interviewer is ready to provide or not :)

    but asking is your right, because u also spend your precious time attending interview, as much as he/she spend time taking on.

    Regards,
    Tiger2K

    #80 Venkat on 07.25.08 at 5:28 am

    Hi to all,

    This is venkat. I am working as a tester in a small scale company. The above discussions and the information is really help ful to us like newer to testers.

    Hi tiger2k ur reply is too helpful to me. Thanks alot man. Keep in reply to us.

    Tiger2k Can i meat u in gmail ?

    #81 koushik on 07.25.08 at 6:46 am

    Hi,
    How to test the font size, allignment, pixels using manual testing?

    #82 koushik on 07.25.08 at 6:47 am

    Hi,
    How to test the font size, allignment, pixels in a webpage using manual testing?

    #83 Tiger2K on 07.27.08 at 7:02 am

    Hi Venkat,
    My email id is lonegladiator@gmail.com

    Regards,
    Tiger2K

    #84 Punit Agrawal on 07.28.08 at 11:38 am

    I am new to Automated Testing, I want to learn it as soon as possible, please help me out to learn the tools, it will be very useful for me.I am currently into Manual Testing.

    #85 RAZA on 08.07.08 at 9:20 am

    Hi
    I am new in Testing field.I have just join an MNC.All these above conversation was quite helpful for me.
    I have joined as a Testing professional due to my family responsibilties even I was working on .Net platform having some projects also.
    So anyone please help me out by clearing out that what are future oppurtunities in Testing and what are different profiles under this.
    I will be very thankful to you.

    #86 shwetha on 08.20.08 at 8:25 am

    Hi ,I was previously into telecom domain mainly in to RF.How is it helpful to change the domain now into testing after 2.5yrs of telecom…

    #87 kavita on 08.21.08 at 11:40 am

    This really provided me a good info, i want to further about testing like
    1. What are the exact procedures/process followed in software testing from the begining of the project to end of the projects.

    #88 sasi on 08.22.08 at 12:30 pm

    hi vijay
    how many testplans can we prepare for single project?

    #89 Rash Kauser on 09.08.08 at 4:20 pm

    I am highly impressed by the disscusion over here.
    Can I get the email id for Vijay D and Tiger2K? Thanks and Regards- Rash

    #90 Tiger2k on 09.10.08 at 3:36 pm

    Hi Rash,
    My E-mail id lonegladiator@gmail.com. if you have any queries you can shoot at this e-mail id.I will try my best to answer. :)

    Regards,
    Tiger2K

    #91 manju on 09.11.08 at 11:06 pm

    Please can u send Testing interview Questions and answers

    #92 sachin on 09.15.08 at 6:32 am

    please can u send the defect tracking tool name and how
    to use it

    #93 vandana on 09.16.08 at 10:45 am

    Thankyou for information.. can anyone please send me readymade test cases for study.. i am a student

    #94 Venu on 09.19.08 at 5:00 am

    Hi All,
    Could u send test case template and give an example

    #95 priyadarsini on 09.23.08 at 12:25 pm

    Hi friends,
    Can u tell me what is test plan and their types.

    #96 lakshmi on 09.30.08 at 12:42 am

    hi,
    I must tell u that this is a cool site for all the doubts on Qa.
    Now, I have just completed my Qa testing course.Thinking that i would land into a testing job sooner or later!
    As the days is passing now iam kind of scared as whether i will get a job?? with out any experience how will i tune my knowledge of testing ??what shud i do so that i should not be left behind??also can anyone send me a sample to test cases to my id rajyakumar@yahoo.com.I appreciate it! thanks! raji

    Leave a Comment