Pages

Saturday 9 November 2013

How to write a better test case!!!

 Image courtesy: http://www.mindmeister.com

Starting with the basic definition, Test Case is a set of input pre-conditions and output post-conditions that are verified for a particular Test Condition identified for the given specification. My definition is, test case is nothing but investigating the functionality in various ways. And the test case could be determined by Pass/Fail status after the execution of it. Every where requirements are mapped with only two types of cases, they are like Positive test cases, Negative test cases. Subsequently go on with the sub requirements too.

Usually test cases are written to estimate the test coverage in the application. Most of the companies which follows standards will author test cases prior to the start testing. It is better to write test cases before starting official testing practice rather doing endless adhoc testing.

1.Before start writing a test case, read out the functional document of the application area. Analyze the test environment carefully and what is the expected behavior of the test area
2.Try to prepare a checklist of all the functionalists. And that checklist could be your test scenario and our target is to identify various cases for the scenarios.
3.For every front end design point mentioned in the document prepare at-least one positive and one negative case.
4.Ensure your test case must cover all the points mentioned in the specification document. Functional and GUI cases are to be written separately.
5.Start with the high priority scenarios which features are important to the application.
6.Test steps must be clear and accurate but not too long. Avoid duplication of test cases
7.Test data should be prepared for every test case. Expected and Actual result must be logged during execution

 With the above characteristics a better test case can be written.

Test Case id: ID Number
Test Scenario: Can be our checklist
Test Case:Test case identified from the scenario. Positive or negative and more...
Test Case Description: Proper and accurate steps for executing the test case
Test Data: Input data to be used for executing the test case
Expected Result: Result as the specification document
Actual Result: Result determined from the application after executing the test case
Status: Pass/Fail
Review Comments: Comments written by the reviewer


Happy Testing...




A Journey towards Testing...:)