White Box 1
White Box 2
White Box 3
Black Box 1
Experiece Based
100

Which one of the following is the description of statement coverage?

a) It is a metric, which is the percentage of test cases that have been executed

b) It is a metric, which is the percentage of statements in the source code that have been executed

c) It is a metric, which is the number of statements in the source code that have been executed by test cases that are passed

d) It is a metric, that gives a true/false confirmation if all statements are covered or not

b) It is a metric, which is the percentage of statements in the source code that have been executed


Is correct. Statement testing exercises the executable statements in the code. Statement coverage is measured as the number of statements executed by the tests divided by the total number of executable statements in the test object, normally expressed as a percentage

100

Which of the following descriptions of statement coverage is CORRECT?

a) Statement coverage is a measure of the number of lines of source code exercised by tests

b) Statement coverage is a measure of the proportion of executable statements in the source code exercised by tests

c) Statement coverage is a measure of the percentage of lines of source code (without comments) exercised by tests

d) Statement coverage is a measure of the number of executable statements in the source code exercised by tests

b) Statement coverage is a measure of the proportion of executable statements in the source code exercised by tests


Statement coverage is a measure of the proportion of executable statements exercised by tests (normally presented as a percentage)

100

What is decision coverage?

a) The coverage of condition outcomes

b) Decision coverage is a synonym for statement coverage

c) The coverage of executable statements

d) The coverage of decision outcomes

d) The coverage of decision outcomes

100

Which of the following statements BEST describes how test cases are derived from a use case?

a) Test cases are defined based on non-functional requirements such as usability 

b) Test cases are designed to cover various user behaviors including basic, exceptional or alternative and error behaviors associated with human users or systems 

c) Test cases are created using white-box test techniques to execute scenarios of use cases 

d) Test cases are derived based on pair testing between a user and a tester to find defects

b) Test cases are designed to cover various user behaviors including basic, exceptional or alternative and error behaviors associated with human users or systems

100

For which of the following situations is exploratory testing suitable?


a) When time pressure requires speeding up the execution of tests already specified

b) When the system is developed incrementally, and no test charter is available

c) When testers are available who have enough knowledge of similar applications and technologies

d) When an advanced knowledge of the system already exists, and evidence is to be provided that it should be tested intensively

c) When testers are available who have enough knowledge of similar applications and technologies


Exploratory tests should be performed by experienced testers with knowledge of similar applications and technologies

200

Which statement about the relationship between statement coverage and decision coverage is true?

a) 100% decision coverage also guarantees 100% statement coverage

b) 100% statement coverage also guarantees 100% decision coverage

c) 50% decision coverage also guarantees 50% statement coverage

d) Decision coverage can never reach 100%

a) 100% decision coverage also guarantees 100% statement coverage

Is correct. The statement is true. Achieving 100% decision coverage guarantees 100% statement coverage

200

Which of the following descriptions of decision coverage is CORRECT?

a) Decision coverage is a measure of the percentage of possible paths through the source code exercised by tests

b) Decision coverage is a measure of the percentage of business flows through the component exercised by tests

c) Decision coverage is a measure of the ‘if’ statements in the code that are exercised with both the true and false outcomes

d) Decision coverage is a measure of the proportion of decision outcomes in the source code exercised by tests

d) Decision coverage is a measure of the proportion of decision outcomes in the source code exercised by tests


Decision coverage is a measure of the proportion of decision outcomes exercised (normally presented as a percentage)

200

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) 3

d) 4

b) 2


A simple IF statement will be composed of If ... then ... else.... end if. There are two decision outcomes, one for the result of the If being true and one for it being false. Since 100% decision coverage requires at least one test case for each decision outcome, two tests are needed.

200

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

I. Divides possible inputs into classes that have the same behavior   

II. Can be used to create both positive and negative test cases   

III. Makes use of only positive test cases for the equivalence partitions   

IV. Must always include at least two values from every equivalence partition   

V. Can be used only for input testing

a) I and II

b) I, II and V

c) I, III and IV

d) I and V

a) I and II

200

Which of the following provides the BEST description of exploratory testing?

a) A testing practice in which an in-depth investigation of the background of the test object is used to identify potential weaknesses that are examined by test cases

b) An approach to testing whereby the testers dynamically designs and execute tests based on their knowledge, exploration of the test item and the results of previous tests

c) An approach to test design in which test activities are planned as uninterrupted sessions of test analysis and design, often used in conjunction with checklist-based testing

d) Testing based on the tester's experience, knowledge and intuition

b) An approach to testing whereby the testers dynamically designs and execute tests based on their knowledge, exploration of the test item and the results of previous tests

300

The following statement refers to decision coverage:

“When the code contains only a single ‘if’ statement and no loops or CASE statements, and its execution is not nested within the test, any single test case we run will result in 50% decision coverage.”

Which of the following statement is correct?

a) The statement is true. Any single test case provides 100% statement coverage and therefore 50% decision coverage

b) The statement is true. Any single test case would cause the outcome of the “if” statement to be either true or false

c) The statement is false. A single test case can only guarantee 25% decision coverage in this case

d) The statement is false. The statement is too broad. It may be correct or not, depending on the tested software

b) The statement is true. Any single test case would cause the outcome of the “if” statement to be either true or false


Is correct. Since any test case will cause the outcome of the “if” statement to be either TRUE or FALSE, by definition we achieved 50% decision coverage

300

If you are testing a module of code, how do you determine the level of decision coverage you have achieved?

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


d) By taking the number of decision outcomes you have tested and dividing that by the total number of decision outcomes in the module


Decision coverage looks at the number of decision outcomes, not just the decision statements.

300

Which of the following statements about the relationship between statement coverage and decision coverage is correct?

a) 100% decision coverage is achieved if statement coverage is greater than 90%

b) 100% statement coverage is achieved if decision coverage is greater than 90%

c) 100% decision coverage always means 100% statement coverage

d) 100% statement coverage always means 100% decision coverage

c) 100% decision coverage always means 100% statement coverage

300

Which of the following BEST matches the descriptions with the different categories of test techniques?

1. Test cases are based on test basis which may include the requirements, use cases and user stories

2. Test cases are based on the test basis which may include the software architecture or code

3. Test cases can show deviations from the requirements 

4. These test techniques are applicable to both functional and non-functional testing

5. Tests are based on knowledge of developers, users, and other stakeholders

Black - Black-box test techniques

White - White-box test techniques 

Experience - Experience-based test techniques


a) Black - 1,2; White - 3,4; Experience - 5

b) Black - 2,3; White - 1,5; Experience - 4

c) Black - 2,3; White - 1; Experience - 4,5

d) Black - 1,3,4; White - 2; Experience - 5

d) Black - 1,3,4; White - 2; Experience - 5

300

When exploratory testing is conducted using time-boxing and test charters, what is it called?

a) Schedule-based testing

b) Session-based testing

c) Risk-based testing

d) Formal chartering

b) Session-based testing

400

For the following piece of code, how many test cases are needed to get 100% statement coverage?   

Procedure X   

Read (Color) // Input color from user   

IF (Color == “Red”) THEN   

Call Roses(Color)   

ELSEIF (Color == “Blue”) THEN   

Call Violets(Color)   

ELSE   

PRINT “User is no Shakespeare”   

SaveToDatabase(Color)   

End Procedure X

a) 5

b) 3

c) 1

d) 2

b) 3

400

Given the following sample of pseudo code:

Input ExamScore

If ExamScore <= 75 then

Print "Candidate has failed"

Else

Print "Candidate has passed"

If ExamScore >= 120 then

Print "Candidate has achieved a distinction"   

EndIf   

EndIf 

What is the minimum number of test cases required to guarantee 100% decision coverage?


a) 2

b) 1

c) 3

d) 4

c) 3

400

How is statement coverage determined?

a) Number of test decision points divided by the number of test cases

b) Number of decision outcomes tested divided by the total number of executable statements

c) Number of possible test case outcomes divided by the total number of function points

d) Number of executable statements tested divided by the total number of executable statements

d) Number of executable statements tested divided by the total number of executable statements

400

Assume postal rates for light letters are:

$0.25 up to 10 grams

$0.35 up to 50 grams

$0.45 up to 75 grams

$0.55 up to 100 grams

Which test inputs (in grams) would be selected using boundary value analysis?


a) 0, 9, 19, 49, 50, 74, 75, 99, 100

b) 10, 50, 75, 100, 250, 1000

c) 0, 1, 10, 11, 50, 51, 75, 76, 100, 101

d) 25, 26, 35, 36, 45, 46, 55, 56

c) 0, 1, 10, 11, 50, 51, 75, 76, 100, 101

400

Which of the following BEST describes the concept behind error guessing?

a) Error guessing requires you to imagine you are the user of the test object and guess mistakes the user could make interacting with it

b) Error guessing involves using your personal experience of development and the mistakes you made as a developer

c) Error guessing involves using your knowledge and experience of defects found in the past and typical mistakes made by developers

d) Error guessing requires you to rapidly duplicate the development task to identify the sort of mistakes a developer might make

c) Error guessing involves using your knowledge and experience of defects found in the past and typical mistakes made by developers

500

Consider a mobile app that allows customers to access and manage their bank accounts. A user story has just been added to the set of features that checks customers’ social media accounts and bank records to give personalized greetings on birthdays and other personal milestones. Which of the following test techniques could a PROGRAMMER use during a unit test of the code to ensure that coverage of situations when the greetings ARE supposed to occur and when the greetings ARE NOT supposed to occur?

a) Statement testing

b) Exploratory testing

c) State transition testing

d) Decision testing

d) Decision testing


Decision testing involves test cases that follow the control flows that occur from a decision point, which in this case would be deciding whether a greeting should or should not be given

500

A batch application has been in production unchanged for over two years. It runs overnight once a month to produce statements that will be e-mailed to customers. For each customer, the application goes through every account and lists every transaction on that account in the last month. It uses a nested-loop structure to process customers (outer loop), each customer’s accounts (middle loop), and each account’s transactions (inner loop).

One night, the batch application terminates prematurely, failing to e-mail statements to some customers, when it encounters a customer with one account for which no transactions occurred in the last month. This is a very unusual situation and has not occurred in the years since this application was placed in production.

While fixing the defect, a programmer asks you to recommend test techniques that are effective against this kind of defect. Which of the following test techniques would most likely have been able to detect the underlying defect?

a) Decision testing

b) Statement testing

c) Checklist-based testing

d) Error guessing

a) Decision testing


For a loop construct, statement coverage only requires that all statements within the loop are executed, but decision coverage requires testing of both the conditions where the loop is executed and when it is bypassed

500

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

a) 3, 3

500

A class grade application for instructors assigns letter grades based on students' numerical grades.

The letter grades for different numerical grades should be:

Above 89, up to 100 - A

Above 79, up to 89 - B

Above 69, up to 79 - C

Above 59, up to 69 - D

Below 60 - F

Which of the following sets of test inputs would achieve the relatively highest equivalence partition coverage?

a) 0, 58, 59, 70, 80

b) 69, 79, 80, 89, 90

c) 74, 79, 84, 85, 89

d) 79, 89, 90, 99, 100

b) 69, 79, 80, 89, 90

500

You are testing a mobile app that allows customers to access and manage their bank accounts. You are running a test suite that involves evaluating each screen and each field on each screen against a general list of user interface best practices, derived from a popular book on the topic, that maximize attractiveness, ease-of-use, and accessibility for such apps. Which of the following options BEST categorizes the test technique you are using?


a) Specification-based

b) Exploratory

c) Checklist-based

d) Error guessing

c) Checklist-based

The list of user interface best practices is the list of test conditions

M
e
n
u