Calendar

September 2017
M T W T F S S
« Jul    
 123
45678910
11121314151617
18192021222324
252627282930  

Calendar

September 2017
M T W T F S S
« Jul    
 123
45678910
11121314151617
18192021222324
252627282930  

Follow us on…

  • {name}
  • Google Profile
  • LinkedIn
  • Twitter
  • Facebook
  • YouTube
  • slideshare

Facebook

Recent videos

Posted on: January 14-2014 | By : Salil Jog | In: Testing | 2 Comments

Take a structured approach when writing test cases. Just a few best practices, when followed, ensure you write good test cases. It is simple just make sure to:

1. Identify the purpose of testing
2. Define how to perform testing
3. Identify Non-functional requirements
4. Define a framework of test cases
5. Become familiar with the modular principle

 

Structuring of Test cases

Eight Tips to Writing Simple Test CasesNow you have all the required information to begin writing test cases. We will talk about the structure of a test case. Requirements of the software are mapped with test scenarios, which are further elaborated in test cases. For each test scenario, we define test cases. In each test case, we define Test Steps. Test Step is the smallest entity under any test case. It specifies the action to be performed and expected result of the test application.

 

Typical flow for test cases:

1. Test Case ID
2. Module to be tested
3. Test Data
4. Test Steps
5. Expected results
6. Actual results
7. Conclusion
8. Comments

 

While conducting tests mark your results against each step, such that the defect report provides respective test case ID that failed during execution.

 

The length of test cases varies depending on the tester, some write detailed ones while other keep it simple and short. However, it is recommended to keep them short.

 

Tips to Write Effective Test Cases

  • Self-explanatory and specific – Test cases should have sufficient details so that new testers can execute them without any help. All the pre-requisite for executing tests should be mentioned in the tests itself. Test cases should also clearly specify the purpose and scope of the procedure.
  • Valid and concise – Test cases should optimal steps, enough to fulfill test parameters.
  • Traceable – Test cases should cover all software requirements, and every test case should be mapped against the “Requirement ID”. This practice also helps during impact analysis.
  • Maintainable – With changes in requirement, testers should maintain the suite of test cases. It should reflect the changes in software and accordingly steps should be modified.
  • Positive and negative coverage – Test cases should test for boundary values, equivalence classes, normal, and abnormal conditions. Apart from testing for expected results, the negative coverage can help in testing failure conditions and error-handling.
  • Coverage for Usability aspect – The UI interface should be tested for ease of use. The overall layout and color should be tested against a style guide, if defined and against the signed off mock- up designs.
  • Test Data – There should be diversity in data to be used in test cases such as – Valid data, Legitimate invalid data (to test boundary value), Illegal, and abnormal data (to test error handling and recovery).
  • Non-Functional aspect – The test cases should cover scenarios for basic performance testing, security aspects, browser support, etc.

 

Structure your tests to cover all the functional requirements first, and then include test cases for non-functional requirements, as they are equally important for proper functioning of the software.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 1.00 out of 5)
Loading ... Loading ...

Salil Jog


 
 
  1. MaheshMD on February 17, 2014 at 11:52 am Says:

    Nice beginning, Salil.
    Waiting to see some more.

  2. Indumathi on February 17, 2014 at 4:24 pm Says:

    Good start Salil. To add to the tips mentioned above, Authoring and reviewing details such as Written by, date, Reviewed by and date can help in versioning and audit the test suite

Leave a Reply

 

*

© 2017 Syntel, Inc.