Skip to main content

Unit Testing

Unit Testing is the smallest testable part of the software.  It may be a function, Class, procedure and the Interface. In Unit Testing individual unit of source code are tested to determine whether they are fit for use.

Unit Testing is the short source code testing which is done by programmer or done by white box tester during the development process. This testing mode is component of Extreme Programming (XP), which means developing a product with continuous testing and revisions.



In the Unit Testing, developer think only about the unit which is under test. If any error occur then they fix it as per the Unit without thinking about the effect over other unit. Once every unit fix or error free then on integration we concern about the effects.

Unit Testing finds problem early in the development phase. These bugs may be because of the flow that development are using or any missing part in the specification. The cost of finding the bugs in Unit Testing phase is lower if bugs found in later stages so Unit Testing is very important phase of Testing as per the cost.

Unit Testing allow the programmer to upgrade system in later stage means unit testing allow the user to change the code if needed. Unit Testing make the system less interdependent so the changes on one unit reduces the error in other units.

Unit Testing simplifies the Integration Testing. It uses the bottom up testing approach. First tested the Unit and them complete modules so possibility of errors is reduces.

Unit Testing is the part of documentation. Developer look at the document and as per the document write the code.


Comments

Popular posts from this blog

What is API?

In general way, API (Application Programming Interface) is the intermediate software which is useful for two applications to communicate. API is the tool which is used for interaction of two applications. If developer developing any software which have multiple blocks (Modules) than developer use APIs to put them together.

Ad-Hoc Testing

Ad-Hoc Testing is the testing type which is performed without any proper procedure and without any Requirement Specification. Ad-Hoc testing is totally informal testing which have intension to break the application as early as possible and found important defect early.  In Ad-hoc testing tester do not have any test cases so only the users who have very high knowledge regarding the application only they can perform Ad-Hoc Testing.

XPath Expression to locate Web Element

In last article i mentioned you how to locate the Web Element with id, Name, LinkText, Partial LinkText, CSS Selectors, Class Name and Tag Name. We use FireBug add-one to use these 7 locators to locate the Web Element on Web Page. Now we are talking about XPath expression. Which is also a type of Locator. We need FirePath add-ons to use it.