Test Techniques
Dynamic Testing
Analysis → what to test
Design → how to test
Black Box or Behavioral-based
Common characteristics of black-box test techniques include the following:
• Test conditions, test cases, and test data are derived from a test basis that may include software
requirements, specifications, use cases, and user stories
• Test cases may be used to detect gaps between the requirements and the implementation of the
requirements, as well as deviations from the requirements
• Coverage is measured based on the items tested in the test basis and the technique applied to
the test basis
White Box or Structural or Architectural
Experience-based
What is the definition of “test technique”?
→ A procedure used to define test conditions, design test cases, and specify test data
“Use cases’ are examples of test basis for
→ Black-box test technique
“Knowledge of testers and developers” is one of the test basis for
→ Experience-based test technique
Which one of the following options is categorized as a black-box test technique?
→ Techniques based on formal requirements
Black Box Techniques
To achieve 100% coverage with this technique, test cases must cover all identified partitions (including
invalid partitions)
2-value
Boundary
3-value
Boundary
States are the squares
Transitions are the lines
Tests are designed to exercise the defined behaviors (basic, exceptional or alternative, and error handling)
Which of the following best describes the behaviors defined in a use case that should be covered by tests?
→ Basic, exception and error
Question #4.2.01
An employee’s bonus is to be calculated. It cannot be negative, but it can be calculated down to zero. The bonus is based on the length of employment:
What is the minimum number of test cases required to cover all valid equivalence partitions for calculating the bonus?
The 4 equivalence partitions correspond to the description in the question, i.e. at least one test case must be created for each equivalence partition 1. Equivalence partition: 0 ≤ employment time ≤ 2. 2. Equivalence partition: 2 < employment time < 5. 3. Equivalence partition: 5 ≤ employment time ≤ 10. 4. Equivalence partition: 10 < employment time.
Question #4.2.02
A speed control and reporting system has the following characteristics:
Which would be the most likely set of values (km/h) identified by applying the boundary value analysis, where only the values on the boundaries of the equivalence classes are selected?
The following partitions can be identified: 1. <= 50, boundary value 50 2. 51 – 55 boundary values 51, 55 3. 56 – 60 boundary values 56, 60 4. >=61 boundary value 61 Boundary value according to glossary V.3.2: A minimum or maximum value of an ordered equivalence partition
Which of the following statements BEST describes how test cases are derived from a use case?
Test cases are created to exercise defined basic, exceptional and error behaviors performed by the system under test in collaboration with actors.
This explains that each use case specifies some behavior that a subject can perform in collaboration with one or more actors. It also (later) explains that tests are designed to exercise the defined behaviors (basic, exceptional and errors)
You are testing an unattended gasoline pump that only accepts credit cards. Once the credit card is validated, the pump nozzle placed into the tank, and the desired grade selected, the customer enters the desired amount of fuel in gallons using the keypad. The keypad only allows the entry of digits. Fuel is sold in tenths (0.1) of a gallon, up to 50.0 gallons.
Which of the following is a minimum set of desired amounts that covers the equivalence partitions for this input?
There are three equivalence partitions: - No sale completed (0.0 gallons) - A valid sale occurs (0.1 to 50.0 gallons) - An invalid amount is selected (50.1 or more gallons) Is correct. This set of input values has exactly one test per equivalence partition
Question #4.2.13
You are testing an e-commerce system that sells cooking supplies such as spices, flour, and other items in bulk. The units in which the items are sold are either grams (for spices and other expensive items) or kilograms (for flour and other inexpensive items). Regardless of the units, the smallest valid order amount is 0.5 units (e.g., half a gram of cardamom pods) and the largest valid order amount is 25.0 units (e.g., 25 kilograms of sugar). The precision of the units field is 0.1 units.
Which of the following is a set of input values that cover the boundary values with two-point boundary values for this field?
There are three equivalence partitions, with the boundaries as shown: - Invalid too low (0.4 and below) - Valid (0.5 to 25.0) - Invalid too high (25.1 and above) Is correct. Each of those four two-point boundary values are included in this set of tests
Question #4.2.14
Consider the following decision table for the portion of an online airline reservation system that allows frequent flyers to redeem points for reward travel:
Suppose that there are two equivalence partitions for the condition where Account/password okay is not true, one where the account is invalid and another where the account is valid but the password is invalid. Suppose that there is only one equivalence partition corresponding to the condition where Account/password okay is true, where both the account and password are valid.
If you want to design tests to cover the equivalence partitions for Account/password okay and also for this portion of the decision table, what is the minimum number of tests required?
There is at least one test for each column in the decision table. However, column one requires two tests, one where the account is invalid and another where the account is valid, but the password is invalid, so the minimum number of tests is four.
Question #4.2.16
You are testing an e-commerce system that sells cooking supplies such as spices, flour, and other items in bulk. The units in which the items are sold are either grams (for spices and other expensive items) or kilograms (for flour and other inexpensive items). Regardless of the units, the smallest valid order amount is 0.5 units (e.g., half a gram of cardamom pods) and the largest valid order amount is 25.0 units (e.g., 25 kilograms of sugar). The precision of the units’ field is 0.1 units.
Which of the following is a MINIMAL set of input values that cover the equivalence partitions for this field?
There are three equivalence partitions, with the boundaries as shown: - Invalid too low (0.4 and below) - Valid (0.5 to 25.0) - Invalid too high (25.1 and above)