2) Unit Testing:
- When the Design Documents are base-lined, corresponding Programmers can start Coding by writing Programs.
- The same programmers can test these Programs to validate completeness and correctness.This process is called Unit Testing.
- This Unit Testing is also called as program testing / code testing / white box testing / glass box testing / open box testing / clear box testing.
a) Basic Paths coverage:
Programmers can use this technique to confirm that the Program is Running without any syntax and run time errors.
While applying this technique, programmers can follow below process:
- Write the Program
- Draw a flow Graph for that program and then
- Find the Number of Paths in that Graph
- Run the Program that many times to cover Entirely.
Here in this 'Basic Paths coverage' technique, programmers goal is to cover all the regions.
Note: The number of paths in a program is called as "Cyclomatic complexity"(CC).
Example:
Programmers use this Technique to validate that the Program correctness in terms of Inputs and Outputs. This technique is called also called as 'Debugging'
Debugging : Checking a program line by line for correction of inputs and outputs.
c) Program Technique coverage:
Programmers use this Technique to calculate the execution speed of a program. If program speed is not reasonable then programmer acn modify the proper structure without disturbing the functionality.
Example: Swapping of two numbers
A=10
B=10
C=A (This logic will take less time and more memory)
A=B
B=C
if we follow the above logic then we will get a=20 and b=10. in the same way let us apply the second logic which is as follows:
A=10
B=20
A=A+B (This logic will Take less memory and more time)
B=A+B
A=A-B
if we follow the above logic then we will get a=20 and b=10 same as above.
As we know for any company time is most precious one, so programmers will apply the 1st logic.
d) Mutation coverage:
Mutation means a change in program. Programmers use this technique to confirm that the program is tested completely or not.
In this Technique, Programmers perform a Change in Tested Program and Repeat Testing.
While conducting the re-testing, programmers can try to find the changes in that program. If the changes are not identified then that program testing is incomplete.
This mutation coverage technique is also called as 'Bebugging'.
0 comments:
Post a Comment