Praxis CSV Basics
Praxis CSV Basics
Realistic?!?!?
Far fewer tests cases – resulting in a great of paths
untested.
To achieve full line coverage, every line of code is to
be executed at least once during the testing process.
Car Insurance Scenario
In the flow diagram:
◦ Diamonds Represent: a logical condition or predicate.
◦ Rectantgle Represents: a sequence of processing steps that are
executed unconditionally.
◦ Head of Arrow: Indicates the flow of control
◦ Circ le – End of transition.
Complete Full Path Coverage
1= 1-2-3-5-6-8-9-11-12-17
2= 1-2-3-5-6-8-9-13-14-15-17
3= 1-2-3-5-6-8-9-11-13-14-16
4= 1-2-3-5-6-8-10-11-17
…
13= 1-2-4-5-6-8-9-11-12-17
14= 1-2-4-5-6-8-9-13-14-15-17
…
23= 1-2-4-5-7-8-10-11-13-14-15-17
24= 1-2-4-5-7-8-10-11-13-14-16-17
Measures the complexity of a program or module.
Addition to this it also measures the “maximum
number of independent paths needed to successfully
achieve full line coverage”
Calculates this through a formulae to work out the
independent paths needed.
This type of method works off the characteristics of a
flow graph. Our example will give us a better
understanding of how McCabes theories work!
The formulae:
V(G) = R
V (G) = E –N + 2
V(G) = P + 1
Our Example
V(G) = 6
V(G) = 21 -17 + 2 = 6
V(G) = 5 + 1 = 6
Resulting metrics calculations indicate that the maximum number of independent paths
is 6.
Summary
Programs with cyclomatic complexities of less then 5 are simple and easy to understand
20+ The complexity is perceived as high.
50+ the software for practical purposes becomes unpractical.
This type of procedure is very crucial and is just important as the rest.
Main objective is to check whether the software program qualifies
(coding and documentation) to the correct standards.
This will lead to a more efficient program when:
Team leaders check the software,
Replacement programmers proceed with existing programmers
tasks.
Maintenance programmer to fix and update the system.
Software Qualification tests first takes into account whether the software
development responded positively.
Example:
Does the coding style fulfil coding style procedures.
Does the code fulfil the correct standards and structure of the code.
Is the Documentation to the correct standard.
Main procedure is to determine whether the packaging
and documentation of the programs listed for reuse
confirm to the correct standards.
Reduces the project resources requirements and
improves the quality of the new software systems.
This shortens the development period.
Benefits the whole organisation.
Supporting the of growth of software reuse.
Advantages
Enforces the determination of software correctness as explained
in the processing paths.
Allows performance of line coverage, it allows the tester to
identify the code that has not yet been executed and test cases
can be applied to these lines of code.
It ensures quality of coding work and apply to coding standards.
Disadvantages
As knowledge of code and internal structure is a prerequisite, a
skilled tester is needed to carry out this type of testing, which
increases the cost.
And it is nearly impossible to look into every bit of code to find
out hidden errors, which may create problems, resulting in failure
of the application