ISTQB certification exam questions for chapter Test Analysis and Design

Questions
Q1: Which testing technique do you prefer for the following situations?
1. Severe time pressure
2. Inadequate specification

A    Decision testing

B    Error guessing

C    Statement testing

D    Exploratory testing

Q2: Code Coverage is used as a measure of what?

A    Defects

B    Trends analysis

C    Test Effectiveness

D    Time Spent Testing

Q3: For the code fragment given below, which answer correctly represents minimum tests required for statement and branch coverage respectively?
Discount rate=1;
Fare = 1000;
If ((person == "senior citizen") and ("travel month = January"))
Bonuspoints = 100+Bonuspoints
If (class=="first")
discountRate = 5;
Fare = fare * discountRate;

A    Statement Coverage = 1, Branch Coverage = 2

B    Statement Coverage = 2, Branch Coverage = 2

C    Statement Coverage = 1, Branch Coverage = 3

D    Statement Coverage = 2, Branch Coverage = 4

Q4: One of the differences between the Modified Condition Decision Coverage and the Condition Coverage is:

A    The Condition Coverage ensures all paths through a module are executed whereas the Modified Condition Decision Coverage ensures each path in a decision can independently affect the outcome.

B    The Modified Condition Decision Coverage ensures all alternative paths are executed whereas the Condition Coverage ensure all main paths are executed.

C    The Condition Coverage ensures each condition takes all possible outcomes at lease once whereas the Modified Condition Decision Coverage requires both maximum and minimum values within each field.

D    The Modified Condition Decision Coverage relies on the tester’s skill and past experience whereas the Condition Coverage relies on the way in which the system moves from one condition to another.

Q5: A wholesaler sells printer cartridges. The minimum order quantity is 5. There is a 20% discount for orders of 100 or more printer cartridges. You have been asked to prepare test cases using various values for the number of printer cartridges ordered. Which of the following groups contain three test inputs that would be generated using Boundary Value Analysis?

A    5, 6, 20

B    4, 5, 80

C    4, 5, 99

D    1, 20, 100

Q6: Which of the following statements describe why exploratory testing is a useful test design technique?
a. It can help derive test cases based on the internal structure of systems.
b. It is useful when there are limited specification documents available.
c. It is useful when there testing is constrained due to time pressures.
d. It is a cheaper alternative to more formal test design techniques.

A    b and c

B    a and c

C    b and d

D    c and d

Q7: Which of the following statements correctly describes the benefit of fault attacks?

A    They are more effective at finding faults than formal test design techniques

B    They are useful when there is limited experience in the test team

C    They can evaluate the reliability of a test object by attempting to force specific failures to occur

D    They are less structured than other experience-based techniques

Q8: The following code segment contains a potential "divide by 0" error.
J=50
K=1
while (J>=10) and (N<=10) loop
M [K] = J/N
K = K + 1
N = N - 1
end loop
Which of the following is the most effective way of detecting this error?

A    Boundary testing

B    Condition testing

C    Compilation of the source code

D    Source code inspection

Q9: Postal rates for 'light letters' are 25p up to 10g, 35p up to 50g plus an extra 10p for each additional 25g up to 100g. Which test inputs (in grams) would be selected using equivalence partitioning?

A    8, 42, 82, 102

B    4, 15, 65, 92, 159

C    10, 50, 75, 100

D    5, 20, 40, 60, 80

Q10: Which of the following is a form of functional testing?

A    Boundary value analysis

B    Usability testing

C    Performance testing

D    Security testing

Q11: Considering the following pseudo-code, calculate the MINIMUM number of test cases for statement coverage, and the MINIMUM number of test cases for decision coverage respectively.
READ A
READ B
READ C
IF C>A THEN
IF C>B THEN
PRINT "C must be smaller than at least one number"
ELSE
PRINT "Proceed to next stage"
ENDIF
ELSE
PRINT "B can be smaller than C"
ENDIF

A    3, 3.

B    2, 3.

C    2, 4.

D    3, 2.

Q12: Equivalence partitioning consists of various activities:

A    Ensure that test cases test each input and output equivalence class at least once

B    Identify all inputs and all outputs

C    Identify equivalence classes for each input

D    All of the above

Q13: If the pseudo code below were a programming language ,how many tests are required to achieve 100% statement coverage?
1. If x=3 then
2. Display_messageX;
3. If y=2 then
4. Display_messageY;
5. Else
6. Display_messageZ;
7. Else
8. Display_messageZ;

A    1

B    2

C    3

D    4

Q14: A program validates a numeric field as follows:
Values less than 10 are rejected, values between 10 and 21 are accepted, values greater than or equal to 22 are rejected. Which of the following covers the MOST boundary values?

A    9,10,11,22

B    9,10,21,22

C    10,11,21,22

D    10,11,20,21

Q15: What is the important criterion in deciding what testing technique to use?

A    How well you know a particular technique

B    The objective of the test

C    How appropriate the technique is for testing the application

D    Availability of time

Q16: If a candidate is giving an exam of 40 questions, should get 25 marks to pass (61%) and should get 80% for distinction, what is equivalence class.

A    23, 24, 25

B    0, 12, 25

C    30, 36, 39

D    32,37,40

Q17: One of the following is not a part of white box testing as per BS7925-II standards.

A    Random testing

B    Data Flow testing.

C    Statement testing.

D    Syntax testing.

Q18: Exclusive use of white box testing in a test-phase will:

A    Ensure the test item is adequately tested.

B    Make the need for black-box testing redundant.

C    Run the risk that the requirements are not satisfied.

D    Suffices for the unit testing phase.

Q19: 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% .
To the nearest $ which of these is a valid Boundary Value Analysis test case?

A    $1500

B    $32001

C    $28000

D    $33501

Q20: Equivalence partitioning is:

A    A black box testing technique used only by developers

B    A black box testing technique than can only be used during system testing

C    A black box testing technique appropriate to all levels of testing

D    A white box testing technique appropriate for component testing

Q21: What statement about expected outcomes is FALSE:

A    Expected outcomes are defined by the software’s behaviour

B    Expected outcomes are derived from a specification, not from the code

C    Expected outcomes include outputs to a screen and changes to files and databases

D    Expected outcomes should be predicted before a test is run

Q22: Which of the following is true about White and Black Box Testing Technique:-

A    Equivalence partitioning, Decision Table and Control flow are White box Testing Techniques.

B    Equivalence partitioning, Boundary Value Analysis , Data Flow are Black Box Testing Techniques.

C    Equivalence partitioning, State Transition, Decision table testing are black box Testing Techniques.

D    Equivalence Partitioning, State Transition, Use Case Testing and Decision Table are White Box Testing Techniques.

Q23: In a Examination a candidate has to score minimum of 24 marks in order to clear the exam. The maximum that he can score is 40 marks. Identify the Valid Equivalence values if the student clears the exam.

A    22,23,26

B    21,39,40

C    29,30,31

D    0,15,22

Q24: Use cases can be performed to test

A    Performance testing

B    Unit testing

C    Business scenarios

D    Static testing

Q25: The ___________ technique can be used to achieve input and output coverage

A    Boundary value analysis

B    Equivalence partitioning

C    Decision table testing

D    State transition testing

Q26: A thermometer measures temperature in whole degrees only. If the temperature falls below 18 degrees, the heating is switched off. It is switched on again when the temperature reaches 21 degrees. What are the best values in degrees to cover all equivalence partitions?

A    15,19 and 25.

B    17,18 and19.

C    18, 20 and22.

D    16, 26 and 32.

Q27: A wholesaler sells printer cartridges. The minimum order quantity is 5. There is a 20% discount for orders of 100 or more printer cartridges. You have been asked to prepare test cases using various values for the number of printer cartridges ordered. Which of the following groups contain three test inputs that would be generated using Boundary Value Analysis?

A    5, 6, 20

B    4, 5, 80

C    4, 5, 99

D    1, 20, 100

Q28: Which of the following types of defects is use case testing MOST LIKELY to uncover?

i) Defects in the process flows during real-world use of the system.
ii) Defects in the interface parameters in integration testing.
iii) Integration defects caused by the interaction and interference of different components.
iv) Defects in the system as it transitions between one state and another.

A    ii, iii.

B    i, iii.

C    iii, iv.

D    i, ii

Q29: We can achieve complete statement coverage but still miss bugs because:

A    The failure occurs only if you reach a statement taking the TRUE branch of an IF statement, and you got to the statement with a test that passed through the FALSE branch.

B    The failure depends on the program's inability to handle specific data values, rather than on the program's flow of control.

C    We are not required to test code that customers are unlikely to execute.

D    All of the above

Q30: Error guessing is best used:

A    after more formal techniques have been applied

B    as the first approach to deriving test cases

C    by inexperienced testers

D    after the system has gone live

Q31: Requirement 24.3. A 'Postage Assistant' will calculate the amount of postage due for letters and small packages up to 1 kilogram in weight. The inputs are: the type of item (letter, book or other package) and the weight in grams. Which of the following conform to the required contents of a test case?

A    Test the three types of item to post and three different weights

B    Test 1: letter, 10 grams, postage €0.25. Test 2: book, 500 grams, postage €1.00. Test 3: package, 999 gram, postage €2.53

C    Test 1: letter, 10 grams to Belgium. Test 2: book 500 grams to USA. Test 3: package, 999 grams to South Africa

D    Test 1: letter 10 grams, Belgium, postage €0.25. Test 2: package 999 grams to South Africa, postage €2.53

Q32: 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

A    3

B    4

C    2

D    1

Q33: 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?

A    One more test case will be required for 100 % decision coverage.

B    Two more test cases will be required for 100 % statement coverage, one of which will be used to provide 100% decision coverage.

C    None, existing test cases can be used.

D    One more test case will be required for 100" statement coverage.

Q34: Which test design technique relies heavily on prior thorough knowledge of the system?

A    Data driven testing technique

B    Experience-based technique

C    White-box technique

D    Structure-based technique

Q35: Match the following terms and statements.

1.Decision Table Testing
2.Decision Testing
3.State Transition Testing
4.Exploratory Testing


W. Testing carried out to achieve specific test objectives, possibly to complement structured testing.
X. A test technique used which may be used to verify different system re depending on current conditions or previous history.
Y. A test technique which combines combinations of inputs that might not otherwise have been exercised during testing.
Z. A form of control flow testing based on decision outcomes.

A    1Y, 2Z, 3X, 4W.

B    1X ,2W, 3Z, 4Y

C    1Z, 2X, 3W, 4Y.

D    1Z, 2Y, 3X, 4W.

Q36: Which test approaches or strategies are characterized by the descriptions below?

S. Process-compliant approaches
T. Heuristic approaches
U. Consultative approaches
V. Regression-averse approaches

1. Includes reuse of existing test material
2. Listens to suggestions from technology experts
3. Adheres to industry-specific standards
4. Runs test execution and evaluation concurrently

A    S4, T3, U2, V1

B    S1, T2, U3, V4

C    S2, T3, U1, V4

D    S3, T4, U2, V1

Q37: Which of the following is MOST characteristic of specification based (black-box) techniques?

A    Test cases can be easily automated.

B    Test cases are independent of each other.

C    Test cases are derived systematically from models of the system .

D    Test cases are derived systematically from the delivered code.

Q38: Complete statement and branch coverage means:

A    That you have tested every statement in the program.

B    That you have tested every statement and every branch in the program.

C    That you have tested every IF statement in the program.

D    That you have tested every combination of values of IF statements in the program

Q39: How many test cases are needed to achieve 100 % statement coverage?
if ((temperature < 0) or
(temperature > 100)) {
alert ("DANGER");
if ((speed > 100) and (load <= 50)) {
speed = 50;
}
} else {
check = false;
}

A    5

B    4

C    2

D    3

Q40: ‘X’ has given a data on a person's age, which should be between 1 to 99. Using BVA which is the appropriate one

A    0,1,2,99

B    1, 99, 100, 98

C    0, 1, 99, 100

D    . –1, 0, 1, 99

Q41: Which is not a black box testing technique

A    Equivalence partition

B    Decision tables

C    Transaction diagrams

D    Decision testing

Q42: Purpose of test design technique is

A    Identifying test conditions only, not Identifying test cases

B    Not Identifying test conditions, Identifying test cases only

C    Identifying test conditions and Identifying test cases

D    Identifying test conditions or Identifying test cases

Q43: Based on the IEEE Standard for Software Test Documentation (IEEE Std 829-1998), which sections of the test incident report should the following items be recorded?

Sections
a) Test incident report identifier
b) Summary
c) Incident description
d) Impact

Items
1. Impact on test plans
2. Unique identifier
3. Anomalies
4. Procedure step
5. Environment
6. References to other relevant documents

A    a: 2; b: 4; c: 1, 3 and 5; d: 6

B    a: 2; b: 3; c: 4, 5 and 6; d: 1

C    a: 2; b: 6; c: 3, 4 and 5; d: 1

D    a: 2; b: 1; c: 3, 4 and 5; d: 6

Q44: The Switch is switched off once the temperature falls below 18 and then it is turned on when the temperature is more than 21. Identify the Equivalence values which belong to the same class.

A    12,16,22

B    24,27,17

C    22,23,24

D    14,15,19

Q45: What is an equivalence partition (also known as an equivalence class)?

A    A set of test cases for testing classes of objects

B    An input or output range of values such that only one value in the range becomes a test case

C    An input or output range of values such that each value in the range becomes a test case

D    An input or output range of values such that every tenth value in the range becomes a test case.

Q46: One of the fields on a form contains a text box which accepts alpha numeric values. Identify the Valid Equivalence class

A    BOOK

B    Book

C    Boo01k

D    book

Q47: Which of the following techniques is NOT a White box technique?

A    Statement Testing and coverage

B    Decision Testing and coverage

C    Condition Coverage

D    Boundary value analysis

Q48: One of the fields on a form contains a text box which accepts numeric values in the range of 18 to 25. Identify the invalid Equivalence class

A    17

B    19

C    24

D    21

Q49: Perform sufficient testing to evaluate every possible path and condition in the application system. The only test method that guarantees the proper functioning of the application system is called as _____________

A    Regression Testing

B    Exhaustive Testing

C    Basic Path Testing

D    Branch Testing

Q50: The testing technique that requires devising test cases to demonstrate that each program function is operational is called

A    Black-box testing

B    Glass-box testing

C    Grey-box testing

D    White-box testing

Q51: A white box testing technique that measures the number of or percentage of decision directions executed by the test case designed is called

A    Condition coverage

B    Decision/Condition coverage

C    Decision Coverage

D    Branch coverage

Q52: Which test may not mimic real world situations

A    Functional testing

B    Structural Testing

C    All of the above

D    None of the above

Q53: _______ includes both Black box and White Box Testing features

A    Gray Box Testing

B    Hybrid Testing

C    A. & B.

D    None

Q54: Fault Masking is

A    Error condition hiding another error condition

B    Creating a test case which does not reveal a fault

C    Masking a fault by developer

D    Masking a fault by a tester

Q55: Statement Coverage will not check for the following.

A    Missing Statements

B    Unused Branches

C    Dead Code

D    Unused Statement

Q56: Boundary value testing

A    Is the same as equivalence partitioning tests

B    Test boundary conditions on, below and above the edges of input and output equivalence classes

C    Tests combinations of input circumstances

D    Is used in white box testing strategy

Q57: An input field takes the year of birth between 1900 and 2004
The boundary values for testing this field are

A    0,1900,2004,2005

B    1900, 2004

C    1899, 1900, 2004, 2005

D    1899, 1900, 1901,2003,2004,2005

Q58: How many test cases are necessary to cover all the possible sequences of statements (paths) for the following program fragment? Assume that the two conditions are independent of each other:
if (Condition 1)
then statement 1
else statement 2
fi
if (Condition 2)
then statement 3
fi

A    2 Test Cases

B    3 Test Cases

C    4 Test Cases

D    Not achievable

Q59: A common test technique during component test is

A    Statement and branch testing

B    Usability testing

C    Security testing

D    Performance testing

Q60: Given the following sample of pseudo code:
01 Input number of male rabbits
02 Input number of female rabbits
03 If male rabbits > 0 and female rabbits > 0 then
04 Input Do you want to breed (Yes / No)
05 If breed = "No"
06 Print "Keep male and female rabbits apart!"
07 End if
08 End If. Which of the following test cases will ensure that statement "06" is executed?

A    male rabbits = 1, female rabbits = 1, breed = "yes".

B    male rabbits = 1, female rabbits = 1, breed = "no".

C    male rabbits = 1, female rabbits = 2, breed = "yes".

D    male rabbits = 1, female rabbits = 0, breed = "no".

Q61: A system under development contains complex calculations and decision logic, and it is assessed as high risk because of the relative inexperience of the development team in the application domain. Which of the following would be the MOST appropriate choice of test design technique for component testing?

A    Decision testing.

B    Statement testing

C    State transition testing

D    Equivalence partitioning

Q62: Which of the following statements describe why experience-based test design techniques are useful?
(a) They can help derive test cases based on analysis of specification documents.
(b) They can identify tests not easily captured by formal techniques.
(c) They make good use of tester's knowledge, intuition and experience.
(d) They are an effective alternative to formal test design techniques.

A    a and b

B    b and d

C    c and d

D    b and c

Q63: A defect was found during testing. When the network got disconnected while
receiving data from a server, the system crashed. The defect was fixed by
correcting the code that checked the network availability during data transfer.
The existing test cases covered 100% of all statements of the corresponding
module. To verify the fix and ensure more extensive coverage, some new
tests were designed and added to the test suite.

What types of testing are mentioned above?

A. Functional testing.

B. Structural testing.

C. Re-testing.

D. Performance testing.

A    A, B and D.

B    A and C.

C    A, B and C.

D    A, C and D.

Q64: Which of the following statements are true for the equivalence partitioning test technique?

A. Divides possible inputs into classes that have the same behaviour.

B. Uses both valid and invalid partitions.

C. Makes use only of valid partitions.

D. Must include at least two values from every equivalence partition.

E. Can be used only for testing equivalence partitions inputs from a Graphical User Interface.

A    A, B and E are true; C and D are false.

B    A, C and D are true; B and E are false.

C    A and E are true; B, C and D are false.

D    A and B are true; C, D and E are false.

Q65: An employee’s bonus is to be calculated. It cannot become negative, but it
can be calculated to zero. The bonus is based on the duration of the
employment. An employee can be employed for less than or equal to 2 years,
more than 2 years but less than 5 years, 5 to 10 years, or longer than 10
years. Depending on this period of employment, an employee will get either
no bonus or a bonus of 10%, 25% or 35%.
How many equivalence partitions are needed to test the calculation of the
bonus?

A    3

B    5

C    2

D    4

Q66: Which of the below would be the best basis for fault attack testing?

A    Experience, defect and failure data, knowledge about software failures.

B    Risk analysis performed at the beginning of the project.

C    Use Cases derived from the business flows by domain experts.

D    Expected results from comparison with an existing system.

Q67: Which of the following would be the best test approach when there are poor
specifications and time pressures?

A    Use Case Testing.

B    Condition Coverage.

C    Exploratory Testing.

D    Path Testing.

Q68: Which one of the following techniques is structure-based?

A    Decision table testing.

B    Boundary value analysis.

C    Equivalence partitioning.

D    State transition testing.

Navigation :

ISTQB Home |  ISTQB mock tests |