Unit Testing in Software Testing With Example

What is Unit Testing?
Unit Testing is a type of software testing in which we test the individual unit of software application.
unit testing is a level of software testing where the development team tests each and every line of code by directly looking into the source code during the development of application.the main of doing the unit testing is to validate each unit of the software application performs as designed,here unit means the smallest testable part of the application it can be (individual function , method,module, object or procedure ).

Unit Testing In Sofware Testing With example

In software development model unit testing is first level of testing which perform before the integration testing . Unit testing is a white box testing technique that is performed by development team ,Software test engineers also do the unit testing .

"Unit Testing is defined as a type of software testing where individual components of a software are tested"

Level of Testing :

Software Testing Levels

Why do we do unit testing ?
  • The main reason of doing unit testing is to find and fix the bugs in development cycle to save the cost and isolate each unit of the system to identify, analyze and fix the defects.
  • Unit testing helps to verify the correctness of the code .
  • Unit testing helps to test every function and procedure.
  • Unit test help for code reuse .
  • Unit testing  helps the developers to understand the code base and enables them to make changes quickly.
  • Unit testing helps to improve the design and allows better refactoring of code.
When to do Unit Testing?
Generally unit testing is performed at the time of application development and it is first level of testing performed before the integration testing.

Who Perform unit Testing?
Generally Unit testing is perform by the development team , developer , it may also performed by independent testers .

How to do Unit Testing?
There are two way to do the unit testing in software engineering 
  • Manual
  • Automation
Tools for unit Testing?
There are several tools are available in the market for unit testing, here some of the most popular unit testing tools are listed 
  • JUnit
  • JTest
  • Nunit
  • EMMA
  • PHP Unit
Unit Testing Technique 
There are Five unit testing technique in software testing which are listed below
  • Statement Coverage
  • Decision Coverage
  • Branch Coverage
  • Condition Coverage
  • Finite State Machine Coverage
Hope !!! Above Tutorial of Unit Testing in Software Testing are helpful for you ...

QA acharya

Tags: Unit Testing with example, Unit Testing in software Testing , Unit testing with example 


Post a Comment