Professional Documents
Culture Documents
U 6 Software Testing L1
U 6 Software Testing L1
• Steps –
4
1. Design flow graph
for the program or a component
• Graphical representation of control flow of the
program
• Contains –
2. CC = E – N + 2
= number of edges – number of nodes + 2
or
7
3. Select Basis set of Path
Since V(G) = 4,
3 there are four paths
4
5 6 Path 1: 1,2,3,6,7,8
Path 2: 1,2,3,5,7,8
Path 3: 1,2,4,7,8
Path 4: 1,2,4,7,2,4,...7,8
7 Finally, we derive test
cases to exercise these
paths.
8
4. Generate Test Cases For This Paths
Test Test Test Test steps Test Test Defe
case case case case priorit ct
id name descript status y seve
step Expected Actual
ion (pass rity
/fail)
1
5
What is Test case?
• A test case is a document, which has -
- a set of test data, preconditions,
- expected results and post conditions,
• Test Case acts as the starting point for the test execution,
- and after applying a set of input values,
- the application has a definitive outcome and
- leaves the system at some end point or also known as
execution post condition.
Format of Standard Test Cases
(Below is format of a standard login Test case )
Test
Case Actual
Test Expected Pass
ID Test Steps Test Data Result
Scenario Results /Fail
s
Check
1.Go to site
Custome Userid =
http://demo.guru99.com User should As
r Login guru99
TU01 2.Enter UserId Login into Expect Pass
with Password
3.Enter Password application ed
valid = pass99
4.Click Submit
Data
Check
1.Go to site
Custome Userid = User should
http://demo.guru99.com As
r Login guru99 not Login
TU02 2.Enter UserId Expect Pass
with Password into
3.Enter Password ed
invalid = glass99 application
4.Click Submit
Data
• Below are the standard fields of sample test case template:
• Test Title/Name:
- Test case title.
- E.g. verify login page with valid username and password.
• Pre-condition:
- Any prerequisite that must be fulfilled
- before execution of this test case.
- List all pre-conditions in order to successfully execute this test case.
• Dependencies:
- Mention any dependencies on other test cases or test requirement.
2. Control Structure Testing
• Condition testing —
- a test case design method
- that exercises the logical conditions
- contained in a program module
- ex. Testing of Loops, Branching, Switching statements
Simple
loop
Nested
Loops
Concatenated
Loops Unstructured
Loops
Loop Testing: Simple Loops
requirements
output
input events
Black Box Testing - Techniques
1. Equivalence Partitioning
• Equivalence classes
- are evaluated for given input condition
24
1. If an input condition specifies a range,
- one valid and two invalid equivalence classes
- are defined
– Input range: 1 – 10
• By Creating –
• Graph of
- objects and their relationships,
(a)
Here - “objects” can be
data objects,
traditional components new menu select generates document
(modules), and object- file (generation time 1.0 sec) window
oriented elements of
computer software.
allows editing
of Attributes:
is represented as
contains
document background color: white
tex text color: default color
t or preferences
(b)
object Directed link object
#1 (link weight) #2
Node weight
Undirected link
(value
)
Parallel links
object
#
3
(a)
allows editing
of Attributes:
is represented as
contains
document background color: white
tex text color: default color
t or preferences
(b)