Se Unit-4-Psu
Se Unit-4-Psu
i = 0;
n=4;
while (i<n-1) do
j = i + 1;
while (j<n) do
if A[i]<A[j] then
swap(A[i], A[j]);
end do;
i=i+1;
end do;
Flow graph for this program will be
Computing mathematically,
• V(G) = 9 - 7 + 2 = 4
• V(G) = 3 + 1 = 4 (Condition nodes are 1,2 and 3
nodes)
• Basis Set - A set of possible execution path of a
program
– 1, 7
– 1, 2, 6, 1, 7
– 1, 2, 3, 4, 5, 2, 6, 1, 7
– 1, 2, 3, 5, 2, 6, 1, 7
Properties of Cyclomatic complexity:
• Sandwich Testing is a strategy in which top level modules are tested with
lower level modules at the same time lower modules are integrated with
top modules and tested as a system. It is a combination of Top-down and
Bottom-up approaches therefore it is called Hybrid Integration Testing. It
makes use of both stubs as well as drivers.
VALIDATION TESTING
• Validation testing is the process of ensuring if
the tested and developed software satisfies
the client /user needs.
SYSTEM TESTING
• SYSTEM TESTING is a level of software
testing where a complete and integrated
software is tested
• System testing is a process of testing the
entire system that is fully functional
DEBUGGING
• Debugging is the process of fixing a bug in
the software. In other words, it refers to
identifying, analyzing and removing errors. This
activity begins after the software fails to execute
properly and concludes by solving the problem
and successfully testing the software.
• Debugging is the activity carried out by the
development team or a developer after getting
the test report about the defects in the
software from the testing team
Symptoms & Causes
• symptom and cause may be geographically
separated
• symptom may disappear when another problem
is fixed
• cause may be due to a combination of non-errors
• cause may be due to a system or compiler error
• cause may be due to assumptions that everyone
believes
• symptom may be intermittent
Consequences of Bugs
Debugging Techniques
• brute force / testing-guessing possible combinations of a
targeted
• Backtracking-backtrack the incorrect results through the
logic of the program until you find the point where the logic
went astray
• Induction- reasoning or thoughtful strategy-start with the
symptoms of the error , possibly in the result of one or
more test cases, and looking for relationship among the
symptoms, the error is often uncovered.
• Deduction- Use the data to eliminate possible causes