Ch3 4
Ch3 4
4. Testware, including test plans, test cases, test procedures, and automated test scripts
• Planning
• Initiate review
• Individual review
• Identifying review characteristics such as the review type with roles, activities,
and checklists.
• Defining the entry(Start)and exit(Stop) criteria for more formal review types
(e.g., inspections).
• Answering any questions that participants may have about the review.
Individual review
• Evaluating the review findings against the exit criteria to make a review
decision (reject; major changes needed; accept, possibly with minor
changes).
Fixing and reporting
• Creating defect reports for those findings that require changes.
• Fixing defects found (done by the author) in the work product reviewed.
• Accepting the work product when the exit criteria are reached.
Roles and Responsibilities in a formal review
Roles Responsibilities
Author • Creates the work product under review
• Fixes defects in the work product under review
Manager • Review planning and execution of reviews
• Assigns staff, budget, and time
• Monitors ongoing cost-effectiveness
• Executes control decisions
Facilitator (moderator) • Ensures effective running of review meetings
• Mediates, between the different points of view
• Person upon whom the success of the review
depends
Review leader • Takes overall responsibility for the review
• Decides who will be involved and organizes when
and where it will take place
Reviewers • Experts, persons working on the project,
stakeholders
• Identify potential defects in the work product
under review
Scribe (recorder) • Collates potential defects found during the
individual review activity
• Records new potential defects.
Types of Reviews
Informal review
• Scribe is mandatory
• the BEST option to choose when the review must follow a formal process
based on rules and checklists
Peer Review
• The types of reviews described above can be done as peer review i.e.
done by colleague on the same organization level , All of tester , all of
seniors developer or all of leaders
Applying Review Techniques
• Ad hoc ()
• Checklist-based(HLD)
• Scenarios(LLD) and dry runs(Checking use case)
• Role-based (End user) single
• Perspective-based (different )
Ad hoc
• Reviewers are provided with little or no guidance on how this task
should be performed.
• Checklists should be specific to the type of work product under review and
should be maintained regularly.
• Review types are applied which are suitable to achieve the objectives
• Any review techniques used, such as checklist-based or role-based reviewing, are suitable for defect identification in the
work product.
• Large documents are written and reviewed in small chunks to get frequent feedback on defects.
100 req.
20 req. >>
20 req.
20 .
20
20.
• Reviews are scheduled.
• Reviews are conducted on small chunks, so that reviewers do not lose focus
during individual review and/or the review meeting.
20<< 20 << 20 <<
• Defects found are should be handled objectively.
People-related success factors for reviews
include:
• Avoid body language.
• Analysis of program code (Such as, Control flow and dataflow), as well
as the generated output (Such as, HTML and XML) by supporting tool.
• The more complex the flow graph, the greater the measure
IF A=360
THEN IF B>C
THEN A=B
ELSE A=C
ENDIF
ENDIF
Print A
0 >>49 = F
50 >> 100 = P
Test Design Techniques Differences
characteristics of Test Design Techniques
Techniques Characteristics
• Partitions can be identified for any data element related to the test
object, including inputs, outputs, internal.
Equivalence Partitioning
• Any partition may be divided into sub partitions if required
• To achieve 100% coverage with this technique, test cases must cover
all identified partitions (including invalid partitions) by using a
minimum of one value from each partition.
• invalid ranges:
S2 : size 200
S3 : size 0
W2 : weight 1500
W3 : weight 0
Test Cases
Example(3)
A savings account in a bank earns a different rate of interest depending on
the balance in the account:
• The values of the conditions and actions are usually shown as Boolean
values (true or false) or discrete values (e.g., red, green, blue), but can
also be numbers or ranges of numbers.
Decision Tables
Decision Table Structure
Example(1)
• Conditions
1-Employee Type : S and H
2- Hours Worked <40 , =40 , >40
The maximum number of rules = 2 x3
Example(2)
• A marketing company treats clients according to three characteristics:
• Gender
• City Resident
• Age group: A (under 30), B (between 30 and 60), C (over 60).
• A transition is initiated by an event (e.g., user input of a value into a field). The
event results in a transition.
• A state transition table shows all valid transitions and potentially invalid
transitions between states.
• Each use case specifies some behavior that a subject can perform in
collaboration with one or more actors .
The categories are: less than or equal to 2 years, more than 2 years but less
than 5 years, 5 or more years but less than 10 years, 10 years or longer.
What is the minimum number of test cases required to cover all valid
equivalence partitions for calculating the bonus?
A.3
B.5
C.2
D.4
You are testing a machine that scores exam papers and assigns grades.
Based on the score achieved the grades are as follows:
If you apply equivalence partitioning, how many test cases will you need to achieve
minimum test coverage?
A. 6
B. 8
C. 10
D. 12
A video application has the following requirement: The application shall allow playing a
video on the following display sizes:
• 1. 640x480.
• 2. 1280x720.
• 3. 1600x1200.
• 4. 1920x1080.
Which of the following list of test cases is a result of applying the Equivalence Partitioning
test technique to test this requirement?
A. Verify that the application can play a video on a display of size 1920x1080 (1 test)
B. Verify that the application can play a video on a display of size 640x480 and 1920x1080 (2
tests).
C. Verify that the application can play a video on each of the display sizes in the
requirement (4 tests)
D. Verify that the application can play a video on any one of the display sizes in the
requirement (1 test)
Which of the following is an extension of equivalence partitioning?
A. Decision Tables
B. Decision testing
C. Boundary value analysis
D. State transition testing
A speed control and reporting system has the following characteristics:
Which would be the most likely set of values (km/h) identified by two-point
boundary value analysis?
If you apply boundary value analysis, how many test cases will you need to
achieve minimum test coverage?
A. 8
B. 10
C. 12
D. 14
Which of the following is the correct decision table for the following code for
ordering a hamburger ?
Table 2
Table 3
Table 4
Which of the following statements about the given state transition diagram and
table of test cases is TRUE?
A. The given test cases can be used to cover both valid and invalid transitions in
the state transition diagram
B. The given test cases represent all possible valid transitions in the state
transition diagram
C. The given test cases represent only some of the valid transitions in the state
transition diagram.
D. The given test cases represent sequential pairs of transitions in the state
transition diagram
For the following state transactions diagram , how many test case are
required to cover all transitions ?
A.3
B.4
C.5
D.6
2- Structure-Based Techniques
If x = 3
Print (“hello”)
A.1
B.2
C.3
D.4
Print sum (int a, int b) {
int result = a + b;
if (result > 0)
print (“red”, result)
else if (result < 0)
print (“blue”, result)
}
How many test cases are necessary to achieve 100 % statement coverage
A.1
B.4
C.3
D.2
Consider the following control flow chart:
You have run one test case: 1-2-3-4-5-6-7-8-9-10
What percentage of statement coverage have you achieved?
a.50 %
b.80 %
c.90 %
d.100 %
• Evaluate the following control flow diagram and determine the
statement coverage resulting from the execution of the following test
cases:
A-B-D-A-B
A-B-D-E-F
a.33 %
b.53 %
c.83 %
d.100 %
How is statement coverage determined?
Read A
Read B
IF A < 0 THEN
Print “A negative”
ELSE
Print “A positive”
ENDIF
IF B < 0 THEN
Print “B negative”
ELSE
Print “B positive”
ENDIF
2 To 3
2 To 5
4 To 3
4 T0 5
5 To 8
5 To 6
7 To 6
7 To 8
8 To 9
8 To 10
decision outcomes covered by testcase
2 To 3
4 T0 5
5 To 6
7 To 8
8 To 9
The following statement refers to decision coverage: “When the code
contains only a single ‘if’ statement and no loops or CASE statements, any
single test case we run will result in 50% decision coverage.”
Which of the following sentences is correct?
A. The sentence is true. Any single test case provides 100% statement
coverage and therefore 50% decision coverage
B. The sentence is true. Any single test case would cause the outcome of
the “if” statement to be either true or false
C. The sentence is false. A single test case can only guarantee 25% decision
coverage in this case
D. The sentence is false. The statement is too broad. It may be correct or
not, depending on the tested software
Which TWO of the following statements about the relationship between
statement coverage and decision coverage are true?
A. By taking the number of decisions you have tested and dividing that by the
total number of executable statements in the module
B. By taking the number of decisions you have tested and dividing that by the
total number of decisions in the module
C. By taking the number of decisions you have tested and dividing that by the
total lines of code in the module
D. By taking the number of decision outcomes you have tested and dividing
that by the total number of decision outcomes in the module
If you have a section of code that has one simple IF statement, how many
tests will be needed to achieve 100% decision coverage?
A.1
B.2
C.5
D. Unknown with this information
Hint
• These techniques can be helpful in identifying tests that were not easily
identified by other more systematic techniques.
• These mistake, defect, failure lists can be built based on experience, defect and failure data from common
knowledge about why software fails.
B) Exploratory Testing Technique
• In exploratory testing, informal tests are designed, executed, logged, and evaluated
dynamically during test execution.
• The test results are used to learn more about the component or system, and to create
tests for the areas that may need more testing.
• As part of analysis and review , testers create a new checklist or expand an existing checklist, but
testers may also use an existing checklist without modification.
• Such checklists can be built based on experience, knowledge about what is important for the user, or
an understanding of why and how software fails.
• Checklists can be created to support different test types, including functional and non-functional
testing.
• In the absence of detailed test cases, checklist-based testing can provide guidelines and a degree of
consistency.
Which Technique to choose ?
Why Complementary?
Which of the following situations is NOT suited for using exploratory
testing?
D. When the main part of the application can be tested only at the
customer’s site.
Which of the following is a good reason to use experience-based testing?
A. You can find defects that might be missed by more formal techniques
B. You can test for defects that only experienced users would encounter
C. You can target the developer’s efforts to the areas that users will be
more likely to use
D. It is supported by strong tools and can be automated
If you are using error guessing to target your testing, which type of testing
are you doing?
A. Specification-based
B. Structure-based
C. Experience-based
D. Reference-based
What is error guessing?
C. A development technique to verify that all error paths have been coded
A. Schedule-based testing
B. Session-based testing
C. Risk-based testing
D. Formal chartering