Writing effective test cases is as important as testing is concerned. They help in finding the difficult bugs and make test coverage maximum. To write effective test cases, first and foremost thing is to understand the software application very clearly. Test case writing should be started as soon as the development of the software. In this article we will discuss some of the points to remember for writing effective test cases but first let’s understand what is a test case and why do we write test cases.
What is a test case?
Test case is set of activities with expected and actual results executed in sequence to validate the feature of an application. Test case is the document and is designed by the tester based on the SRS document and Use case document.
Definition by Wikipedia: Test case
Test case is a component which has pre condition, steps to execute or actions to perform and expected results according to the requirements given for a particular software application. We write test cases to verify that software works as per the user expectations as well as the business requirements. There are various level of testing, and each of them has test cases.
Effective test cases are those test cases which have maximum test coverage but are minimum in numbers. There is no point writing 1000 of test cases when only 500 is needed. To write or choose the effective test cases is a skill which comes with experience. Below are my top tips to follow when you are designing test cases for an application to make the testing effective.
Tips On Writing Effective Test Cases:
- In- depth study of the documents / requirements is the most important step in writing effective test cases. Before starting test case design, go through all the requirements given in SRS and FRD documents and review them. If you find something doesn’t seem right, make it clear with the client or senior managers so that ambiguity in test cases can be avoided.
- Update cases / results according to the real behavior when you get the real software to test. Test case design starts with the development but when software is ready for testing, it gets some real time difference from what was given in the requirements so you have to update the test cases or expected results accordingly.
- Delete irrelevant test cases whenever there is any requirement changes or if an old feature is replaced with the new one. This will make test cases more organized and you will have all the relevant test cases with you. This will avoid any confusion and extra effort if any new tester execute them.
- Merge similar scenarios to make a better test case. For example. If an application has two text box say username and password and login button, instead of making two different test cases for each of them, it can be merged into one. Here we are looking for quality of test cases not the quantity.
- If possible refer to parent product and analyze the previously logged defects and make them into test cases. In this way you will have the most difficult and prone to error scenarios. It is always beneficial to refer the parent product or similar software for more and different cases.
- Go beyond the requirements and think from different user’s perspective to get the better idea of the usability of the software and out of the box testing scenarios. While writing SRS and FRD, most of the data comes from general scenarios. It is not possible to cover all the cases in the documents. Tester who can use the software from user’s perspective can find the small details which may annoy users and may not be useful for them. In this way you will make your software more usable and of higher quality. Include such scenarios in your test cases.
- Automate repetitive test cases like regression or sanity tests. This will not only save your manual efforts but also time. Whenever a new change or fix is introduced into the software, you have to make sure that it did not affect any old functionality by running regression tests every time. You can use any automation tool to automate regression tests.
- Exploratory or random testing is very important since you can find many defects which are not listed in requirements and hence, convert them into test cases to make test cases more effective. In some cases while UAT, user stories have really good scenarios for testing and it is a good practice to convert them into test cases.
Writing effective test cases is a process, you have to make modifications and include new scenarios while testing is in progress. Test procedure is nothing but a series of execution steps to follow for testing a particular module. Same tips applies when it comes to writing effective test procedures or definitions since UNDERSTANDING is the key here. It includes understanding of the requirements as well as the behavior of the software and proceed with the testing accordingly. If you have anything more to add here then feel free to add in the comments below. This might help other testers out there.
While writing test cases keep in mind that you are covering all types of testing like functional testing, boundary value test cases, negative test cases etc. Make sure that you are writing test cases as simple as mentioned in the “Tips/Guidelines for writing test cases”. Write the test cases to the point, don’t try to add unnecessary steps in test case which leads to problems other tester while executing the cases.
Generally I prefer excel to write down the test cases in format given in the above link. You may use test management tools for writing test cases like HP ALM/Quality center, Zephyr, Testuff, TestLink, QAComplete, qTest, QMetry, PractiTest etc.
⇓ Subscribe Us ⇓
If you are not regular reader of this website then highly recommends you to Sign up for our free email newsletter!! Sign up just providing your email address below:
Happy Testing!!!
- Boundary Value Analysis and Equivalence Class Partitioning With Simple Example
- Software Testing Tips And Tricks For Testing Any Application
- 15 Tips on How to make your software testing more efficient?
- What is difference between Test Cases vs Test Scenarios?
- Test cases for Pen
- Test Cases For Fan
- Step by Step guide to Test Case Development
- Test Case Review Process – Tips and Tricks!
- How Not To Write Test Cases (Tips For Both New And Experienced Testers)
- Should We Put Too Much Detail Into Test Cases?
23 thoughts on “How To Write Effective Test Cases and Procedures?”
Hi, Please tell me what is test bed and test data?
Appreciated your efforts. Keep up the good work.
-Sachin
I am using excel sheet for test case writing, can you please suggest better tool for test case management.
Thanks in advance
One question in my mind, Can we use test cases written in testlink tool for automation?
I want to start automating regression suite test cases.
Please help
Really helpful details for fresher like me.
Thanks for your efforts.
Prachi
Unique and informative article..
Thanks,
Shree
Thanks it is very useful for both fresher and exp peoples.
I want test cases on banking security using stenography, please send me as earliest.
Thanks in advance.
It really is a very helpful content. Thanks.
Thanks STC, good article in simple words.
I want sample test case template, Could u pls any one mail me test case templates.
Very Good Site on Software Testing I ever used. I have few queries, can you please share the test cases on mobile application testing.
Thanks in advance.
Rachana Jain
Really, very useful for efficient test cases writing fresher QA enginineers…. Thanks a lot
Really great article. It is very Nice to understand about test cases writing…………
I want learn more on test case on cokies testing. Please help
Best site for people who want to learn.
Really it’s a exellent information. Now I clearly comes to know how to write efficient test cases. Thank You Very Much :)
My Long time search has concluded.
Gr8 Article about test cases and really helpful document. I got clear idea about test cases.
I found really good content on this site. The way author explained points are descriptive and quite easy to understand. Thanks for your all efforts.
The “Content” is really impressive. Expalined in descriptive method, quite easy to understand for every level of testing professional.
Thumps up to the author, Really precious piece of info and efficiently narrated.
-Laxmi
I am looking test cases for cookie testing, can someone share me the cases.
It’s a very gr8 article. Its really useful article and simply superb content.