Browse Article

Guidelines For Writing Test Cases

June 10, 2016 | Author: | Posted in Careers

Important Guidelines For Writing Test Cases

Test case writing is an important activity in software testing. Let us first define, what do you mean by a test case? before moving forward.


A test case is a group or a set of actions that are executed by a tester, to check that a particular functionality or a feature of the software being tested is as expected or not.

Writing good test cases is an aptitude and that can be accomplished by some experience and in detail investigation of the application on which test cases are being written.

What is the need for writing test cases?

The essential aim of writing test cases is to validate the testing scope of the application. In the event that you are working in any CMMi level organization, then you will entirely take after standards about test cases. So, writing test cases brings some kind of institutionalization and minimizes the ad-hoc method in software testing.

Whether it be manual testing or automation testing, test cases are important. Without them, one cannot proceed further in the testing process. Selenium testing which is carried out using the Selenium automation tool, also has the facility to record test cases in it.

Here are the standard practices for writing effective test cases:

1. Write test cases keeping the end user in mind:

The main objective of any software project is to prepare test cases that meets client prerequisites and is anything but difficult to utilize and work on. A tester must write test cases remembering the end user point of view.

2. Make no assumption:

Try not to assume the functionality and features of your product application while writing test cases. Adhere to the Specification Documents.

3. Make use of testing techniques:

It’s impractical to check each conceivable condition in your software. Testing techniques help you select a couple test cases with the most extreme plausibility of finding a defect.

Boundary Value Analysis (BVA): As the name recommends, the method characterizes the testing of limits for indicated scope of values.

Equivalence Partition (EP): This method partitions the range into equivalent amounts of/groups that have a tendency to have the same behavior.

State Transition Technique: This strategy is utilized when software conduct changes starting with one state then onto the next after specific activity or action.
Error Guessing Technique: This is speculating/foreseeing the defects that may emerge while testing. This is not a formal strategy and takes focal points of an tester’s involvement with the application.

4. Review From Peers:

Subsequent to writing test cases, get them checked by your partners or peers. Your companions can reveal imperfections in your test case design, which you may effortlessly miss.

5. Try to ensure 100% coverage:

Ensure you compose test cases to check all product prerequisites said in the requirement specification document. Use Traceability Matrix to guarantee no functionality/conditions are left untested.

6. Self Cleaning:

The test case you prepare must give back the test environment to the pre-test state and ought not render the test environment unusable. This is particularly valid for configuration testing.

7. Ensure that test case repetition does not happen:

Try not to repeat the test cases. In the event that a test case is required for executing some other test case, call the test case by its id in the pre-condition section.

Include below information while drafting a test case:

The current test case should be in correct business scenario order with other test cases.
Active voice is recommended while writing a test case.
Ideal length of a test case is up to 15 steps. Do not go beyond that.
Attachments or proofs are required.
Details of what requirement is currently under test.
Details of how the system would be tested.

These are a few guidelines, as far as writing test cases is concerned.

This article would be helpful for student Software Testing reviews.

More Related Blogs:

  1. Software Testing and Risk Analysis
  2. Different Techniques Of Software Testing

Article Source


this is training and placement institute in pune .

This author has published 44 articles so far.