Choosing Unit Test Cases - Partition Testing

This quiz covers partition/equivalence testing, black-box vs white-box

download Export
search_insights Statistics
stylus_note White Board
Quran
calculate Calculator
dictionary Dictionary
fullscreen Full Screen
QUESTION OF

volume_mute Read quiz aloud
Views #: 189
Questions #: 12
Pass Score: 80.0%
Style
Mode

Two Strategies for Choosing Test Cases

1 pts
volume_mute
To complete the line match
  1. Click on an item in the first group
  2. Click on an item in the second group
  3. To delete a match, double click on a line

Strategy

Guideline-based testing
Partition testing

Description

Use testing guidelines based on previous experience of common errors to choose test cases
Identify groups of inputs that have common characteristics and should be processed in the same way, then choose tests from within each group

Two key strategies help choose effective unit test cases. Match each strategy to its correct description.

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


What Makes a Good Test Case Set

1 pts
volume_mute

When designing unit test cases, two kinds of test cases should be created. Which of the following correctly describes both kinds? Select all that apply.

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Equivalence Partitions Concept

1 pts
volume_mute

The equivalence partitioning diagram below illustrates the concept.

Input equivalence partitions Possible inputs System Output partitions Possible outputs Correct outputs

What does each smaller unshaded ellipse within the large input ellipse represent?

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Equivalence Partition Example - Integer Input

1 pts
volume_mute

A program specification states: the program accepts 4 to 8 inputs which are 5-digit integers greater than 10,000. Based on equivalence partitioning, identify the correct input partitions for the number of inputs.

Less than 4 Between 4 and 10 More than 10 3 4 7 10 11 Number of input values Less than 10000 Between 10000 and 99999 More than 99999 9999 10000 50000 99999 100000 Input values

Which set of input partitions correctly represents the number-of-inputs dimension for this specification?

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Equivalence Partitions for Integer Values

1 pts
volume_mute
Test Inputs
×50,000
×9,999
×10,000
×99,999
×100,000
Less than 10,000 (invalid)
Between 10,000 and 99,999 (valid)
More than 99,999 (invalid)

Continuing with the same specification (5-digit integers greater than 10,000), classify each test input into the correct partition for the value dimension.

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Boundary Value Selection Rule

1 pts
volume_mute

A good rule of thumb for selecting test cases from equivalence partitions is to choose values at the boundaries and near the midpoint. Why are boundary values particularly important?

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Black-Box vs. White-Box Testing

1 pts
volume_mute

Complete each description with the correct testing approach: "When you use the system (1) to identify equivalence partitions, this is called (2) testing. You don't need any knowledge of how the system works. It is sometimes useful to supplement this with (3) testing, where you look at the (4) to find other possible tests."

Please drag and drop the selected option in the right place or type it instead
code
black-box
specification
white-box
note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Output Equivalence Partitions

1 pts
volume_mute

Which statement correctly describes output equivalence partitions?

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Exception Partitions in White-Box Testing

1 pts
volume_mute

A developer examines the source code and finds that the program includes specific exception handlers for negative number inputs, zero inputs, and very large number inputs. How can this knowledge be used in test-case design?

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Identifying Partitions from Specification

1 pts
volume_mute

A specification states: a method processes a list of student scores and returns a grade. Scores from 0 to 49 are Fail, 50 to 69 are Pass, 70 to 84 are Merit, and 85 to 100 are Distinction. Which set of equivalence partitions is most appropriate for testing this method?

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Why Programs Behave Similarly Within a Partition

1 pts
volume_mute

Why is it valid to test just one or a few values from an equivalence partition rather than every possible value in the partition?

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation


Deriving Test Cases from Partitions

1 pts
volume_mute

For the specification accepting 4 to 8 inputs of 5-digit integers greater than 10,000, which set of test inputs best represents good partition testing practice, including boundary values?

note_alt Add notes
flag Flag
volume_mute

Correct Answer

Explanation