Levels of Testing
Levels of Testing
Levels of Testing
Unit Testing
Unit testing is the first level of testing. This testing is the most basic
type of testing done by the developers before handing the
software/product to the testing team.
Unit Testing Definition?
Unit testing is a type of software testing in which individual units or
components of the software are tested.
Primary Objective: The main objective of unit testing is to isolate
each component of the software and then perform tests to illustrate
that every individual component is accurately meeting the
requirements and delivering the expected output.
Advantages of Unit Testing
Here are some of the advantages of unit testing:
Helps to catch bugs/defects earlier, which preserves both – time
and money
Detects regression bugs (It is a kind of bug that is not found until
and unless the software/product is released or is in production)
Helps to understand the behavior of the code
The cost of conducting unit testing is low.
Disadvantages of Unit Testing
Read A
Read B
if A > B
Print “A is greater than B”
else
Print “B is greater than A”
endif
Case 2:
Case 1:
If A = 4, B= 8
If A = 7, B= 3
No of statements
No of statements Executed= 6
Total statements= 7
Executed= 5
Total statements= 7
Statement coverage= 5 / 7 * 100
Statement coverage= 6
/ =7 * 100
71.00 %
= 85.20 %
Condition Coverage technique
Condition coverage is also known as Predicate Coverage in which each one of the
Boolean expression have been evaluated to both TRUE and FALSE.