Ste (22518) Unit1
Ste (22518) Unit1
•Deadlines
•Completion of test case execution
- test cases executed out of total no. of test cases
•Bug rate falls bellow a threshold
- Defect density is low (defects per unit of lines of code)
•No critical bugs are remaining to be resolved
•Customer asks to stop
•Management Decision
Assignment
• Write at least 5 test cases for testing Gmail
Login Page
How to Decide quality of software?
• Based on Whether the product meets SRS
requirements (Verification)
• Based on Whether product satisfies Customer
needs (Validation)
• SRS Compliance does not always mean Customer satisfaction:
→ change in requirements
→ Faulty SRS
Verification and Validation
• Verification ensures:
Are we building product
correctly? → Process
• Validation ensures: Are
we building correct
product? → Product
Static and Dynamic testing
• Static testing is testing the software without
executing the code/program
→ Mostly include documentation testing
→ Also include techniques like code review, inspection, walkthrough, etc
→ Significant as verification of software
• Quality Control:
→ system of maintaining standards in
manufactured products by testing a
sample of the output against the
specification.
QA Vs QC
V model
• Combines SDLC with STLC
• there is a testing phase parallel to each
development phase
• extension of the waterfall model
Problem with the Waterfall Model
• testing in the model starts only after implementation is done.
• costs of fixing a defect increase across the development
lifecycle. The earlier in life cycle a defect is detected, the
cheaper it is to fix it.
The V model
Testing Techniques
Software
Testing
e. g.
Decision/Branch Coverage
• The goal of decision coverage testing is to cover and validate all the
accessible source code by checking and ensuring that each branch
of every possible decision point is executed at least once.
In example below, we have two paths to test.
• (1) 1A-2C-3D-E-4G-5H
• (2) 1A-2B-E-4F
However, this method may not test following program
fully:
PRINT “Hello World”
IF Date$ = “01-01-2000” AND Time$ = “00:00:00” THEN
PRINT “Happy New Year”
END IF
PRINT “The date is: “; Date$
PRINT “The time is: “; Time$
END
Condition coverage
• also known as Predicate Coverage
• each one of the Boolean expression have been
evaluated to both TRUE and FALSE.
Path Coverage
• involves using the source
code of a program in
order to find every
possible executable path
• this method is designed to
execute all or selected
path through a computer
program
• E.g. there are 3 paths or
condition that need to be
tested to get the output,
• Path 1: 1,2,3,5,6, 7
• Path 2: 1,2,4,5,6, 7
• Path 3: 1, 6, 7
Cyclomatic Complexity
• a testing metric used for measuring the
complexity of a software program
• measure of independent paths in the source
code of a software program
• Cyclomatic complexity can be calculated by
using control flow graphs
• Mathematical representation:
• Mathematically, it is set of independent paths
through the graph diagram. The Code
complexity of the program can be defined
using the formula -
C=E-N+2
Where,
• C- Cyclomatic Complexity
• E - Number of edges
• N - Number of Nodes
• Calculate Cyclomatic Complexity for the program:
A = 10
IF B > C THEN
A=B
ELSE A = C
ENDIF
Print A
Print B
Print C
• The graph
shows seven
shapes(nodes),
seven
lines(edges),
hence
cyclomatic
complexity is
7-7+2 = 2.