QA Slides
QA Slides
2
Why?
3
Introduction
4
Introduction..2
5
Developers vs Testers
8
Test Case Elements..2
● In addition to these basic elements, agile test cases may also include additional
information such as:
○ Priority: The priority of the test case, which can be used to determine which test
cases to execute first.
○ Severity: The severity of the defect that the test case is intended to detect.
○ Owner: The person responsible for executing the test case.
○ Notes: Any additional information about the test case, such as known issues or
workarounds.
9
Example Test Case
10
Test Cases..cont
Test Case
Loading…
Assigned to team
member
Part of Test Set/Suit Has Preconditions Has Specified Steps Part of Test Plan
11
Let’s start by self assessment exercise
Suppose that we have a program that we want to write test cases for:
13
Suggested Test Cases
14
Suggested Test Cases..2
15
Exercise Discussion
● The point of this exercise is to illustrate that the testing of even a trivial
program is not an easy task.
● Given this is true, think of testing of 100K statement program of air
traffic control system!
● A typical GYM desktop program has 15K statements
● A Payroll system can have much more than that
16
Psychology and Economics of SW Testing
17
Tester’s Psychology
● According to research:
○ The tester needs a proper attitude/vision to successfully test a software product.
○ Tester’s attitude is more important than the process/tools applied.
18
Tester’s Psychology..2
19
Tester’s Psychology..3
20
Tester’s Psychology..4
21
Economics of Testing
22
Verification and Validation
24
Verification and Validation
25
Example of Validation
26
V- Model In Software Development
27
Black-Box Testing
Validation Technique
● Finding all errors using this strategy means running the program against all
possible correct and incorrect input.
● But, we can maximize the errors found using a finite number of test cases
28
White-Box Testing
advanced , better for finding bugs expensive and takes
time (good for
more , critical
systems)
● Derives test data by examining the internal program code and structure (i.e,
●
program logic)
Loading…
For instance, one tester may assume that causing every statement to execute
in a program may be the correct answer. (i.e, exhastive path testing of a
program)
● But this is totally untrue as well:
○ The number of unique logic paths in a program can be astronomically
large!
29
White-Box Testing..2
Number of
unique paths =
100 trillions
Exhaustive path
testing is not
possible
30
Software Testing Principles
1 - A necessary part of a
2- A programmer should
test case is a definition
avoid attempting to test
of the expected output
his or her own program.
or result.
roobust ei
6- Examining a program to
see if it does not do what it Most errors
rors reside
reside on
on
throwaway program 32
Software Testing Principals..3
34
Software Testing Principals..4
●
are
features
Retesting: You must retest the
fixes to ensure that issues have
other hand is the act of
been resolved before
development can progress. repeating other tests in
● So, retesting is the act of 'parallel' areas to ensure
repeating a test to verify that a
found defect has been correctly that the applied fix or a
fixed. change of code has not
introduced other errors or
unexpected behavior.
36
Chapter 1 Summary
-
&
e
&
! &
Software Testing and the
Development Process
Dr. Samer Zein
Software Development Team
client
gives us requirements
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Who is responsible for testing?
• This is a favorite interview question!
• Answer:
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Cost of fixing bugs early
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
The role of software testing
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Software Development lifecycle
PdBTDM
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Iterative software Development
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Responsibilities during the planning phase:
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
The analysis/defining phase
should have
acceptance
criteria
by test
engineers
Iwillbuild
or not-measurable /subjective
& search
,
no
product book using
found , the list of book should be ordered by year
-
a
book
if more than
- T oew
book's info
- one
- - -
owner
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Building/Development Phase
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Testing Phase
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Deployment and maintenance phase
• Deployment Phase: in this phase, the product is shared with
customers and potential users:
• Acceptance testing
• System monitoring and bug fixing
• Real users and real data can reveal new errors.
• Maintenance Phase:
• Very long phase.
• System monitoring and big fixing
• New features re-testing
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Overall Testing Activities
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Testing Activities
Can use
test tools like "Sira"
tests
to manage
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Testing Activities
② -
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Testing Activities
Compareexpectesult
00
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Testing Activities
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
-
Test Cases
and Bugs Lifecycle
Dr. Samer Zein
Test Cases Overview
· test senario is for a main feature and contains
many test cases
:corefeaturroduce
high when
major bugs
it's critical (maybe related to
security)
after execting the test case I add actual result and success status
it
can assign default priority first then chang
collection of
cases I
test
run
Choose to
ta
based
on
- Less formal
- Less documentation
- Only recommended
at certain conditions.
high priority
- customer
needs it
not &
iact
G
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Visual Bugs
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Functional & Performance Bugs
"
ecore
functionality - &
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Bug Reporting
I
Sometimes
even save what
are
ever values
when
in memory
bug happened
additional
~
things busa
screenshot
↑
~ Can
-
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Example
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Example 2
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Bug Lifecycle
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Bug Lifecycle States
higs)
e
pending
- Ready to
To
a developer
and
should be
discovered
to minimize
asap
assigned mistakes
time and possible - problemmeest
bug)
case not
a
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Example in Jira
assigned
y eprogrammer -
tester
Software Testing & QA, CS Dept., Birzeit University Dr. Samer Zein
Software Quality Metrics
of to Severity well
weighted number errorsa related as
Software Quality
Metrics
BY S A M E R Z E I N , P H D
BIRZEIT UNI., SOFTWARE TESTING, DR. SAMER ZEIN Source: Galin, 2004
11
X
best
M
BIRZEIT UNI., SOFTWARE TESTING, DR. SAMER ZEIN Source: Galin, 2004
12
·
BIRZEIT UNI., SOFTWARE TESTING, DR. SAMER ZEIN Source: Galin, 2004
13
Error Severity Metrics
-high severity /I
errors is
BIRZEIT UNI., SOFTWARE TESTING, DR. SAMER ZEIN Source: Galin, 2004
14
Software Process Timetable Metrics
0
-918
6 Ni
months
&
-
1 sild Is
before production after production
acceptances after acceptance
& , testing
testing
BIRZEIT UNI., SOFTWARE TESTING, DR. SAMER ZEIN Source: Galin, 2004
18
Software Process Productivity
Metrics
deal with a project’s human resources productivity as well as “indirect”
metrics that focus on the extent of software reuse.
O
O
O
should cancel
happens I
But ,
database if an error
to
like:
① I save 9
like I use
try [
Comm1
Commecommit ; Ging
el E
&
(SQLException -1
3 Catch -
catch I need
to put smth in
one Bepyr
?
]
called Fel
- should be
constants
55 S
= numbers
-
notactualnumber
of constants
an array
magime
make
deci d ina
ed it's
his shibe
⑤ private
a public
it in
and just call
is the
number
magic should make
problem here , Clockwise
3-degrees
constant called
-
a
~
?
⑧
⑧?
is best ?
which
X
X
-
X
they didn't
bad comments ,
value
add any
write a
comment
should
thiso
I
explainingwhatis
-
-
-
V
X
manual functional testing :- testcases ;i
time 7 : 00 10 jo)
Mon ,
one ,
,
(sat Member 21 : 00
,
17 yu
, ,
Member 20
: 00
,
70 yo)
(Friday
,
,
18 yo)
(Thursday M, 6 : 00
,
,
19)
(Thursday ,
M , 5 :05 ,
1900a
invaliFitsinpu Thursday Ot ,
,
equivilant classes for days >
- weekday ,
weekend
,
status >
-
hours -
Ot ,
6-14
M ,
invalid e if free text
19 %- 24 boundaries (3 2 6)
1 - -
-
-
((6)
early
*
> .
=
, ,
120 boundaries
visitor age > 0 +6
-
,
16 1-60 .
,
60 1
.
- , so
---- ,
-- 1)
L ~
I
-----xx)
of them
just
some
(b) invalid
13) invalid
13) below
(4) negative
(5)abovea
(4) negative
15) below
(6) exactly
Confidential Customized for Lorem Ipsum LLC Version 1.0
Black-Box Testing
Methods
Software QA, Birzeit University - Dr. Samer Zein
Black-Box Testing: Intro
•Think of its techniques as a complement to White-Box
testing techniques, not a substitute.
•will probably not exercise the check for the amount, since the
program may say ‘‘XYZ IS UNKNOWN BOOK TYPE’’ and not bother
to examine the remainder of the input.
ways invalid
-
member 01 b :
invalid (00
-
, :
one time ,
status -
-6-19 19024 ,
hours ,
19 01 , 6 24
19
(negative)
. ,
, limits -
> ,
10 0 16 00) (16 01
.
60 .
00) (60 .
01 - 120 .
0) invalid (CO)
agen
- -
.
, ,
.
( > 120)
16 60 120 (
limits (0 ,
,
,
(Mon ,
OT
,
7 : 00 ,
15 y10) >
- 5:00
(Sun ,
ot
,
7:00 ,
15 ylo) >
- 7 5 .
2 3
(Mon M 7 : 00 15 y() -
.
,
, ,
(Mon , ot 6 : 00 S
15 y(0) >
- 5
,
5
(Mon , or 19 : 00
,
13 y(0) -
6
(Mon , ot
15 y(0) -
,
19 : 01
(Mon ot
15 y(0) >
- 6
,
, 24 : 00
,
(Mon , or
, 24 : 00
,
20 y(0) - 10
8
(Mon , ot
, 24 : 00
,
70y10) -
5
(Mon , ot
24 : 00
,
01
+
3
(Mon , ot
24 : 00
, 16)
+
10
(Mon , ot
24 : 00
, 16. %)
>
-
10
(Mon , ot
24 : 00
,
60)
+
,
8
(Mon , ot
24 : 00
,
60 %).
-
8
(Mon , ot
24 : 00
,
120) -
invalid age
(Mon , or
24 : 00
, -1)
-
,
Should
& be
done
like
this
pif
⑤
↑ 319
j6
-2
around a
test cases
>
-
should be used for Critical Systems
of developers
-
should be done with the help
end at 9
Should
example for path :
a
1 + 2-338 -
19
1- p : empty file
109
4 =5278
+
2
1 +
+
ze 2+9
2e4e6 + 7
+
1 +
.. d
are fiesable
Q : which ones
/
⑧ power
& bothaa
J not complete
na
I
-
--
-
a pm to G am
I have so many paths
3-4 paths
I execute
sure each
So I make
>
- if I do all paths ,
it's
called full path coverage
three
are
enough
For full line
Coverage
this is only to
of the path
69 19 005
.
.
6
Complexity =
= 5- Testable
O too
<= 10e not
· difficult
dis
> 20
- high complexity
750-untestable
White-Box
Software Testing
Techniques
• “At early times, Software Testing was confined to the final stage of
development (Big Bang)”
Daniel, 2004
Software QA & Testing, CS Dept., Birzeit University - Samer
Zein (Ph.D)
Software Testing is:
Formal
SW
Specialized Running
Team Testin
Code
g
Approved test
procedures and test
cases
P3, P4 are
incomplete,
• The proportion of test cases required to test the system by full line
coverage of three test cases (by basic path testing) versus full path
coverage of 24 test cases is 1:8!
• This ratio grows rapidly with program complexity.
McCabe’s # of Independent
Flow Cyclomatic Paths
Graph Complexity
•<= 5 Testable
•> 50 Untestable
Inspections and
► He is a skilled programmer
► responsibilities are to:
► Test Specialist:
► The specialist should be well versed in software
testing
► and familiar with the most common
programming errors
try{
…..
…..
catch(SomeException ex){
throw ex;
} Software QA & Testing -CS Dept - BZU, Dr. Samer Zein
25
Tutorial 6: General Code
Inspection Guidance
COMP438
PART 1
PART 1 DISCUSSION
● Inspect the above code carefully can reveal several types of errors from different
● What is wrong with the above code? Would you approve it?
PART 2:
Suppose you’re reading some code that uses a turtle graphics library that you don’t
know well, and you see the code:
DISCUSSION
PART 3:
For each of the following re-writes, which one you would choose and WHY?
A) B)
C) D)
PART 4:
What do you think about the following comments? What should be really written when we write
down comments for our code?
PART 5
Which comments are useful additions to the code? Consider each comment independently, as if
the other comments weren’t there.
test-driven
development
TDD &
return of investment
ROI e