ISTQB Sample Exam Questions – White Box Testing
ISTQB - Sample Exam 2 (White Box Testing)
This quiz concentrates on questions related to White Box Testing Techniques such as Code Coverage, Branch Coverage, Statement Coverage, Control-Flow, LCSAJ, etc. Start Congratulations - you have completed ISTQB - Sample Exam 2 (White Box Testing). You scored %%SCORE%% out of %%TOTAL%%. Your performance has been rated as %%RATING%%Your answers are highlighted below.
| Question 1 |
| State analysis | |
| Memory analysis | |
| Dynamic analysis | |
| Coverage analysis |
| Question 2 |
| Missing Statements | |
| Dead Code | |
| Unused Branches | |
| Unused Statement |
| Question 3 |
| A minimal test set that achieves 100% path coverage will also achieve 100% statement coverage. | |
| A minimal test set that achieves 100% LCSAJ coverage will also achieve 100% branch coverage. | |
| A minimal test set that achieves 100% path coverage will generally detect more faults than one that achieves 100% statement coverage. | |
| A minimal test set that achieves 100% statement coverage will generally detect more faults than one that achieves 100% branch coverage. |
| Question 4 |
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 | |
| 2 tests for statement coverage, 2 for branch coverage | |
| 1 test for statement coverage, 1 for branch coverage | |
| 1 test for statement coverage, 2 for branch coverage |
| Question 5 |
| white box | |
| structural | |
| glass box | |
| functional |
| Question 6 |
…………
if (Condition 1)
then statement 1
else statement 2
fi
if (Condition 2)
then statement 3
fi
…………
| Not achievable | |
| 2 Test Cases | |
| 3 Test Cases | |
| 4 Test Cases |
| Question 7 |
| Statement Coverage | |
| Condition Coverage | |
| Pole Coverage | |
| Path Coverage |
| Question 8 |
| a static analysis tool | |
| code inspections | |
| a test management tool | |
| code reviews | |
| a coverage tool |
| Question 9 |
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 | |
| ii & iii are True; i, iv & v are False | |
| i & v are True; ii, iii & iv are False | |
| ii, iii & iv are True; i & v are False |
| Question 10 |
| LCSAJ | |
| state transition testing | |
| boundary value analysis | |
| syntax testing |
| Question 11 |
| Data flow testing | |
| Statement testing | |
| Path testing | |
| State transition testing |
| Question 12 |
| unreachable (“dead”) code | |
| array bound violations | |
| the use of a variable before it has been defined | |
| memory leaks |
| Question 13 |
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
| ii is True; i, iii, iv & v are False | |
| ii, iii & iv are True; i & v are False | |
| ii & iii are True; i, iv & v are False | |
| i & v are True; ii, iii & iv are False |
| Question 14 |
| Trends analysis | |
| Defects | |
| Test Effectiveness | |
| Time Spent Testing |
| Question 15 |
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;
| 2 | |
| 1 | |
| 3 | |
| 4 |
| Question 16 |
Ask: “What type of ticket do you require, single or return?”
IF the customer wants ‘return’
Ask: “What rate, Standard or Cheap-day?”
IF the customer replies ‘Cheap-day’
Say: “That will be £11:20”
ELSE
Say: “That will be £19:50”
ENDIF
ELSE
Say: “That will be £9:75”
ENDIF
Now decide the minimum number of tests that are needed to ensure that all
the questions have been asked, all combinations have occurred and all
replies given.
| 5 | |
| 4 | |
| 6 | |
| 3 |
| Question 17 |
IF X < Y
THEN Statement 1;
ELSE IF Y >= Z
THEN Statement 2;
END
McCabe’s Cyclomatic Complexity is :
| 3 | |
| 2 | |
| 5 | |
| 4 |
| Question 18 |
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, 1 for branch coverage | |
| 1 test for statement coverage, 2 for branch coverage | |
| 2 tests for statement coverage, 2 for branch coverage | |
| 1 test for statement coverage, 3 for branch coverage |
| Question 19 |
| are cheap to perform. | |
| can be performed by the person who wrote the code. | |
| enable the code to be tested before the execution environment is ready. | |
| can be performed by inexperienced staff. |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results
|
List
|
Return
Shaded items are complete.
Return
| 1 | 2 | 3 | 4 | 5 |
| 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | End |
You have completed
questions
question
Your score is
Correct
Wrong
Partial-Credit
You have not finished your quiz. If you leave this page, your progress will be lost.
All doneNeed more practice!Keep trying!Just Passed!Good work!Perfect!
