Subscribe the QA and Software Testing Newsletter FREE!! Comments Feed

Unit Test Case

Thursday, May 15, 2008

SPONSORED LINKS

Table of Contents | Subscribe to Software Testing Newsletter
`

In past, on White Box Software Testing, I wrote two posts:

In these posts, I covered some basic concepts of white software box testing. Here, in this post, I'm going to write abount some usefull tips that will help you while designing Unit Test Cases.

Preparing the Unit Test Cases document which is complete with every possible test case, is an important task in Unit Testing activity. It gives an assurance of defect-free Unit at the end of Unit Testing stage. Below are some usefull tips:

  • Input values: Write test cases for each of the identified inputs (positive & negative) accepted by the Unit.
  • Expected Functionality: Cover each functionality that is expected to be in the Unit.
  • Output values: Write test cases which will produce all types of output values that are expected from the module / unit.
  • Path coverage: If the Unit have conditional processing that results in various paths, then write test cases to cover each of these paths.
  • Abnormal terminations: Behavior of the Unit in case of abnormal termination should be tested.
  • Error messages: Check error messages / warnings. These should be short, precise and self-explanatory. They should be properly phrased and free of grammatical mistakes.
  • Screen Layout: Web page or screen layout must be tested against the requirements. Ensure that pages and screens are consistent and as per requirements.
  • If you are testing database application, it is important to make sure that transactions are properly designed and no way inconsistent data gets saved in the database.

Also, please note that the format of the unit test case document can be similar to the format of normal functional test cases. The fields can be:

  • Test Case Id
  • Test Case Purpose
  • Procedure / steps to be performed
  • Input Value / Test Data
  • Expected Result
  • Actual Result
  • Remarks

Also See:

SPONSORED LINKS

Search this site - within more than 167 pages of Software Testing

Do not want to miss any Software Testing tips and latest updates? Subscribe the Software Testing Newsletter and get effective software testing tips

Enter your email address:

Delivered by FeedBurner

12345

0 Responses to Unit Test Case

Post a Comment

Search within more than 200 pages


Subscribe to our updates

Enter your email address:

Delivered by FeedBurner

Follow Software Testing Stuff on Twitter Subscribe Software Testing & QA Pages Through RSS

Blog Archive