Active TopicsActive Topics  Display List of Forum MembersMemberlist  CalendarCalendar  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin


 One Stop Testing ForumTypes Of Software Testing @ OneStopTestingUnit Testing @ OneStopTesting

Message Icon Topic: Unit Testing - Limitations of unit testing

Post Reply Post New Topic
Author Message
tanushree
Senior Member
Senior Member
Avatar

Joined: 04Apr2007
Online Status: Offline
Posts: 2160
Quote tanushree Replybullet Topic: Unit Testing - Limitations of unit testing
    Posted: 12Nov2007 at 11:38pm
Unit Testing - Limitations of unit testing

Unit testing will not catch every error in the program. By definition, it only tests the functionality of the units themselves. Therefore, it will not catch integration errors, performance problems or any other system-wide issues. In addition, it may not be easy to anticipate all special cases of input the program unit under study may receive in reality. Unit testing is only effective if it is used in conjunction with other software testing activities.
It is unrealistic to test all possible input combinations for any non-trivial piece of software. Like all forms of software testing, unit tests can only show the presence of errors; it cannot show the absence of errors. To obtain the intended benefits from unit-testing, a rigorous sense of discipline is needed throughout the software development process. It is essential to keep careful records, not only of the tests that have been performed, but also of all changes that have been made to the source-code of this or any other unit in the software. Use of a version control system is essential; If a later version of the unit fails a particular test that it had previously passed, the version-control software can provide list of the source-code changes (if any) that have been applied to the unit since that time.



Post Resume: Click here to Upload your Resume & Apply for Jobs

IP IP Logged
kalai
Newbie
Newbie


Joined: 24Jun2009
Online Status: Offline
Posts: 8
Quote kalai Replybullet Posted: 24Jun2009 at 5:23am

Very infomatic. Testing cannot be expected to catch every error in the program - it is impossible to evaluate all execution paths for all but the most trivial programs. The same is true for unit testing. Additionally, by definition unit testing only tests the functionality of the units themselves. Therefore it will not catch integration errors, or broader system level errors (such as functions performed across multiple units, or non-functional test areas such as performance). Unit testing is more effective if it is used in conjunction with other software testing activities. Like all forms of software testing, unit tests can only show the presence of errors; it cannot show the absence of errors.

Software testing is a combinatorial problem. For example, every boolean decision statement requires at least two tests: one with an outcome of "true" and one with an outcome of "false". As a result, for every line of code written, programmers often need 3 to 5 lines of test code. This obviously takes time and its investment may not be worth the effort. There are also many problems that cannot easily be tested at all— for example those that are nondeterministic. In addition, writing code for a unit test is as likely to be buggy as the code it is testing. Fred Brooks in The Mythical Man-Month quotes never take two chronometers to sea. Always take one or three. Meaning, if two chronometers contradict, how do you know which one is correct?

To obtain the intended benefits from unit testing, a rigorous sense of discipline is needed throughout the software development process. It is essential to keep careful records not only of the tests that have been performed, but also of all changes that have been made to the source code of this or any other unit in the software. Use of a version control system is essential. If a later version of the unit fails a particular test that it had previously passed, the version-control software can provide a list of the source code changes (if any) that have been applied to the unit since that time.

It is also essential to implement a sustainable process for ensuring that test case failures are reviewed daily and addressed immediately. If such a process is not implemented and ingrained into the team's workflow, the application will evolve out of sync with the unit test suite ― increasing false positives and reducing the effectiveness of the test suite.

for more info... software testing world
IP IP Logged
cprasenjit26
Senior Member
Senior Member
Avatar

Joined: 14May2009
Location: India
Online Status: Offline
Posts: 151
Quote cprasenjit26 Replybullet Posted: 23Jul2009 at 5:26am
Limitations of unit testing very well compiled to enable freshers to understand it easily.
------------------------------------------------
Software Testing
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.
Vyom is an ISO 9001:2000 Certified Organization

© Vyom Technosoft Pvt. Ltd. All Rights Reserved.

Privacy Policy | Terms and Conditions
Job Interview Questions | Placement Papers | Free SMS | Freshers Jobs | MBA Forum | Learn SAP | Web Hosting