WorksheetsISTQB Section 4
Total questions: 25
Worksheet time: 28mins
In a system designed to work out the tax to be paid:
An employee has £4000 of salary tax free. The next £1500 is taxed at 10% The next £28000 is taxed at 22% Any further amount is taxed at 40% Which of these groups of numbers would fall into the same equivalence class?
£4800; £14000; £28000
£5200; £5500; £28000
£28001; £32000; £35000
£5800; £28000; £32000
Which of the following is true about White and Black Box Testing Techniques:
Equivalance partitioning, Decision Table and Control flow are White box Testing Techniques.
Equivalence partitioning , Boundary Value Analysis , Data Flow are Black Box Testing Techniques.
Equivalence partitioning , State Transition , Use Case Testing are black box Testing Techniques.
Equivalence Partioning , State Transition , Use Case Testing and Decision Table are White Box Testing
Techniques.
An input field takes the year of birth between 1900 and 2004. The boundary values for testing this field are
0,1900,2004,2005
1900, 2004
1899,1900,2004,2005
1899, 1900, 1901,2003,2004,2005
White Box Techniques are also called
Structural Testing
Design Based Testing
Error Guessing Technique
Experience Based Technique
What is an equivalence partition (also known as an equivalence class)?
A set of test cases for testing classes of objects
An input or output range of values such that only one value in the range becomes a test case
An input or output range of values such that each value in the range becomes a test case
An input or output range of values such that every tenth value in the range becomes a test case.
Error guessing is best used
As the first approach to deriving test cases
After more formal techniques have been applied
By inexperienced testers
After the system has gone live
Only by end users
Consider the following techniques. Which are static and which are dynamic techniques?
i. Equivalence Partitioning.
ii. Use Case Testing.
iii.Data Flow Analysis.
iv.Exploratory Testing.
v. Decision Testing.
vi Inspections
i-iv are static, v-vi are dynamic.
iii and vi are static, i, ii, iv and v are dynamic.
ii, iii and vi are static, i, iv and v are dynamic.
vi is static, i-v are dynamic.
Test charters are used in
Exploratory testing
Usability testing
Component testing
Maintainability testing
A series of probing questions about the completeness and attributes of an application system is called
Checklist
Checkpoint review
Decision table
Decision tree
Given the decision table above, what is the expected result for the following cases?
A: Fred is a 32 year old smoker resident in London
B: Jean-Michel is a 65 year non-smoker resident in Paris
A – Insure, 10% discount, B – Insure, no discount.
A – Don’t insure, B – Don’t insure.
A – Insure, no discount, B – Don’t insure.
A – Insure, no discount, B – Insure with 10% discount.
. Given the above state transition diagram, which of the following series of state transitions will provide 0-switch coverage?
A, B, E, B, C, F, D.
A, B, E, B, C, F, F.
A, B, E, B, C, D.
A, B, C, F, F, D.
Use cases can be performed to test
Performance testing
Unit testing
Business scenarios
Static testing
Given that data on a person age should be between 1 to 99, which is the appropriate set of values to perform BVA?
0,1,2,99
1, 99, 100, 98
0, 1, 99, 100
–1, 0, 1, 99
Consider the following statements:
i.100% statement coverage guarantees 100% branch coverage.
ii.100% branch coverage guarantees 100% statement coverage.
iii.100% branch coverage guarantees 100% decision coverage.
iv.100% decision coverage guarantees 100% branch coverage.
v.100% statement coverage guarantees 100% decision coverage.
ii is True; i, iii, iv & v are False
i & v are True; ii, iii & iv are False
ii & iii are True; i, iv & v are False
ii, iii & iv are True; i & v are False
Minimum Tests Required for Statement Coverage and Branch Coverage:
Read P
Read Q
If p+q > 100 then
Print “Large”
End if
If p > 50 then
Print “pLarge”
End if
Statement coverage is 2, Branch Coverage is 2
Statement coverage is 3 and branch coverage is 2
Statement coverage is 1 and branch coverage is 2
Statement Coverage is 4 and Branch coverage is 4
Minimum Tests Required for Statement Coverage :
Disc = 0
Order-qty = 0
Read Order-qty
If Order-qty >=20 then
Disc = 0.05
If Order-qty >=100 then
Disc =0.1
End if
End if
Statement coverage is 4
Statement coverage is 1
Statement coverage is 3
Statement Coverage is 2
Given the following code, which is true about the minimum number of test cases required for
full statement and branch coverage:
IF A > B THEN
C = A – B
ELSE
C = A + B
ENDIF
Read D
IF C = D Then
Print “Error”
ENDIF
1 test for statement coverage, 3 for branch coverage
2 tests for statement coverage, 2 for branch coverage
2 tests for statement coverage. 3 for branch coverage
3 tests for statement coverage, 3 for branch coverage
3 tests for statement coverage, 2 for branch coverage
Given the following code, which is true about the minimum number of test cases required for
full statement and branch coverage:
Read P
Read Q
IF P+Q > 100 THEN
Print “Large”
ENDIF
If P > 50 THEN
Print “P Large”
ENDIF
1 test for statement coverage, 3 for branch coverage
1 test for statement coverage, 2 for branch coverage
1 test for statement coverage, 1 for branch coverage
2 tests for statement coverage, 3 for branch coverage
2 tests for statement coverage, 2 for branch coverage
Given the following fragment of code, how many tests are required for 100% decision coverage?
if width > length then
biggest_dimension = width
if height > width then
biggest_dimension = height
end_if
else
biggest_dimension = length
if height > length then
biggest_dimension = height
end_if
end_if
3
4
2
1
You have designed test cases to provide 100% statement and 100% decision coverage for the following fragment of code:
if width > length then
biggest_dimension = width else
biggest_dimension = length end_if
The following has been added to the bottom of the code fragment above:
print "Biggest dimension is " & biggest_dimension
print "Width: " & width
print "Length: " & length
How many more test cases are required?
One more test case will be required for 100 % decision coverage.
Two more test cases will be required for 100 % statement coverage, one of which will be used to provide 100% decision coverage.
None, existing test cases can be used.
One more test case will be required for 100" statement coverage.
Consider the following:
Pick up and read the newspaper
Look at what is on television
If there is a program that you are interested in watching then switch the the television on and watch the program
Otherwise
Continue reading the newspaper
If there is a crossword in the newspaper then try and complete the crossword
SC = 1 and DC = 1
SC = 1 and DC = 2
SC = 1 and DC = 3
SC = 2 and DC = 2
SC = 2 and DC = 3
Given the following:
Switch PC on
Start “outlook”
IF outlook appears THEN
Send an email
Close outlook
1 test for statement coverage, 1 for branch coverage
1 test for statement coverage, 2 for branch coverage
1 test for statement coverage. 3 for branch coverage
2 tests for statement coverage, 2 for branch coverage
2 tests for statement coverage, 3 for branch coverage
Which of the following is NOT a white box technique?
Statement testing
Path testing
Data flow testing
State transition testing
The following statements are used to describe the basis for creating test cases using either black or white box techniques:
i information about how the software is constructed.
ii models of the system, software or components.
iii analysis of the test basis documentation.
iv analysis of the internal structure of the components.
Which combination of the statements describes the basis for black box techniques?
ii and iii.
ii and iv.
i and iv.
i and iii.
Data flow analysis studies:
possible communications bottlenecks in a program.
the rate of change of data values as a program executes.
the use of data on paths through the code.
the intrinsic complexity of the code.
