Moduel 3: Test Techniques Flashcards
Black-Box Test Techniques - Intro (3.1)
The test techniques considered in this chapter are divided into the following categories…
These techniques are…
- Black-box
- Experience-based
Complementary and may be used as appropriate for any given test activity, regardless of which test level is being performed.
Black-Box Test Techniques - Intro (3.1)
Note that both categories of techniques can be used to test…
Functional and non-functional quality characteristics. Testing software characteristics is discussed in the next chapter.
Black-Box Test Techniques - Intro (3.1)
The test techniques discussed in these sections may focus primarily on…
It is common to…
Determining optimal test data (e.g., from equivalence partitions) or deriving test procedures (e.g., from state models).
Combine techniques to create complete test cases.
Black-Box Techniques - Intro (3.2)
Common features of black-box test techniques include:
- Models, e.g., state transition diagrams and decision tables, are created during test design according to the test technique
- Test conditions are derived systematically from these models
Black-Box Techniques - Intro (3.2)
Test techniques generally provide coverage criteria, which can be used for…
Completely fulfilling the coverage criteria does not mean…
Measuring test design and test execution activities.
that the entire set of tests is complete, but rather that the model no longer suggests any additional tests to increase coverage based on that technique.
Black-Box Techniques - Intro (3.2)
Black-box testing is usually based on some form of specification documentation, such as a…
Since the specification documentation should…
In some cases there may be no…
system requirement specification or user stories.
Describe system behavior, particularly in the area of functionality, deriving tests from the requirements is often part of testing the behavior of the system.
Specification documentation but there are implied requirements, such as replacing the functionality of a legacy system.
Black-Box Techniques - Intro (3.2)
There are a number of black-box test techniques. These techniques target different…
The sections below show the…
Types of software and scenarios.
Applicability for each technique, some limitations and difficulties that the Test Analyst may experience, the method by which coverage is measured and the types of defects that are targeted.
Equivalence Partitioning - Intro (3.2.1)
Equivalence partitioning (EP) is a technique used to…
Partitioning is used to…
By selecting one representative value from a partition…
Reduce the number of test cases required to effectively test the handling of inputs, outputs, internal values and time-related values.
Create equivalence partitions (often called equivalence classes) which are created from sets of values that are required to be processed in the same manner.
Coverage for all the items in the same partition is assumed.
Equivalence Partitioning - Intro (3.2.1)
Usually several parameters determine the…
When combining the equivalence partitions of different parameters into test cases…
Behavior of the test object.
Various techniques can be applied.
Equivalence Partitioning - Applicability (3.2.1)
This technique is applicable at any test level and is appropriate when all the members of a set of values to be tested are…
An equivalence partition can be…
The selection of sets of values is applicable to…
Expected to be handled in the same way and where the sets of values used by the application do not interact.
Any non-empty set of values, e.g.: ordered, unordered, discrete, continuous, infinite, finite, or even a singleton.
Valid and invalid partitions (i.e., partitions containing values that should be considered invalid for the software under test).
Equivalence Partitioning - Applicability (3.2.1)
EP is strongest when used in combination with…
EP, using values from the valid partitions, is a…
Boundary value analysis which expands the test values to include those on the edges of the partitions.
Commonly used technique for smoke testing a new build or a new release as it quickly determines if basic functionality is working.
Equivalence Partitioning - Limitations (3.2.1)
If the assumption is incorrect and the values in the partition are…
It is also important to…
For example, an input field that accepts positive and negative numbers might be better tested as…
Depending on whether or not zero is allowed, this could…
It is important for a Test Analyst to…
This may require…
Not handled in exactly the same way, this technique may miss defects.
select the partitions carefully.
Two valid partitions, one for the positive numbers and one for the negative numbers, because of the likelihood of different handling.
Become another partition.
Understand the underlying processing in order to determine the best partitioning of the values.
Support in understanding code design.
Equivalence Partitioning - Limitations (3.2.1)
The Test Analyst should also take into account…
For example, in a flight reservation system, the parameter “accompanying adult” may…
Possible dependencies between equivalence partitions of different parameters.
Only be used in combination with the age class “child”.
Equivalence Partitioning - Coverage (3.2.1)
Coverage is determined by taking the number of…
EP coverage is then stated as…
partitions for which a value has been tested and dividing that number by the number of partitions that have been identified.
A percentage. Using multiple values for a single partition does not increase the coverage percentage.
Equivalence Partitioning - Coverage (3.2.1)
If the behavior of the test object depends on a single parameter…
each equivalence partition, whether valid or invalid, should be covered at least once.
Equivalence Partitioning - Coverage (3.2.1)
In the case of more than one parameter, the Test Analyst should…
Differentiating between…
Regarding the combinations with only valid equivalence partitions, the minimum requirement is…
The minimum number of test cases needed in such a test suite equals…
More thorough coverage types related to combinatorial techniques include…
Invalid equivalence partitions should be…
So each invalid partition contributes…
In case of high risk…
select a simple or combinatorial coverage type depending on the risk [Offutt16].
Combinations containing only valid partitions and combinations containing one or more invalid partitions is therefore essential.
A simple coverage of all valid partitions over all parameters.
The greatest number of valid partitions of a parameter, assuming the parameters are independent on each other.
The pairwise coverage (see Section 3.2.6 below), or the full coverage of any combination of valid partitions.
Tested at least individually, i.e. in combination with valid partitions for the other parameters, in order to avoid defect masking.
One test case to the test suite for simple coverage.
Further combinations may be added to the test suite, e.g. consisting of only invalid partitions, or of pairs of invalid partitions.
Equivalence Partitioning - Types of defects (3.2.1)
A Test Analyst uses this technique to find defects in…
The handling of various data values.
Boundary Value Analysis - Intro (3.2.2)
Boundary value analysis (BVA) is used to test the proper handling of…
Two approaches to BVA are in common use:
With two-value boundary testing…
For example, for amounts in a currency which has two decimal places, if the partition included the values from 1 to 10, the two-value test values for the upper boundary would be…
The lower boundary test values would be…
values that exist on the boundaries of ordered equivalence partitions.
Two-value boundary or three-value boundary testing.
The boundary value (on the boundary) and the value that is just outside the boundary (by the smallest possible increment, based on the required accuracy) are used.
10 and 10.01.
1 and 0.99. The boundaries are defined by the maximum and minimum values in the defined equivalence partition.
Boundary Value Analysis - Intro (3.2.2)
For three-value boundary testing, the values…
In the previous example, the upper boundary tests would include…
The lower boundary tests would include…
The decision regarding whether to use two-value or three-value boundary testing should be based on…
before, on and over the boundary are used.
9.99, 10 and 10.01.
0.99, 1 and 1.01.
The risk associated with the item being tested, with the three-value boundary approach being used for the higher risk items
Boundary Value Analysis - Applicability (3.2.2)
This technique is applicable at any test level and is appropriate when…
For this reason the BVA technique is often…
Ordered equivalence partitions are required because…
For example, a range of numbers is…
A partition that consists of some text strings may be ordered too, e.g. by their lexicographic order, but if the ordering is…
ordered equivalence partitions exist.
conducted together with the EP technique.
Of the concept of being on and off the boundary.
An ordered partition.
Not relevant from the business or technical point of view, then boundary values should not be in focus.
Boundary Value Analysis - Applicability (3.2.2)
In addition to number ranges, partitions for which boundary value analysis can be applied include:
- Numeric attributes of non-numeric variables (e.g., length)
- The number of loop execution cycles, including loops in state transition diagrams
- The number of iteration elements in stored data structures such as arrays
- The size of physical objects, e.g. memory
- The duration of activities
Boundary Value Analysis - Limitations (3.2.2)
Because the accuracy of this technique depends on…
The Test Analyst should also be aware of…
Only ordered partitions can be…
For example, when testing for the number of cells supported by a spreadsheet, there is a partition that contains…
the accurate identification of the equivalence partitions in order to correctly identify the boundaries, it is subject to the same limitations and difficulties as EP.
Tthe precision in the valid and invalid values to be able to accurately determine the values to be tested.
Used for boundary value analysis but this is not limited to a range of valid inputs.
The number of cells up to and including the maximum allowed cells (the boundary) and another partition that begins with one cell over the maximum (over the boundary).
Boundary Value Analysis - Coverage (3.2.2)
Coverage is determined by taking the number of boundary conditions that are tested and…
The coverage is stated as…
Similar to equivalence classes, in the case of multiple parameters, the Test Analyst should…
dividing that by the number of identified boundary conditions (either using the two-value or three-value method).
a percentage.
Choose a simple or combinatorial coverage type, depending on the risk.
Boundary Value Analysis - Types of defects (3.2.2)
Boundary value analysis reliably finds…
This technique finds defects regarding the…
It can also be used to find…
Displacement or omission of boundaries, and may find cases of
extra boundaries.
Handling of the boundary values, particularly errors with less-than and greater-than logic (i.e., displacement).
Non-functional defects, for example, a system supports 10,000 concurrent users but not 10,001.
Decision Tables - Intro (3.2.3)
A decision table is a…
Test Analysts can use decision tables to…
Tabular representation of a set of conditions and related actions, expressed as rules indicating which action shall occur for which set of condition values [OMG-DMN].
Analyze the rules which apply to the software under test and design tests to cover those rules.
Decision Tables - Intro (3.2.3)
Conditions and the resulting actions of the test object form the rows of the decision table, usually with…
The first column of the table contains…
The following columns, called the rules, contain…
the conditions at the top and the actions at the bottom.
The descriptions of the conditions and actions respectively.
The condition values and corresponding action values respectively.
Decision Tables - Intro (3.2.3)
Decision tables in which conditions are Boolean with simple values “True” and “False” are called…
An example for such a condition is “User’s income < 1000”. Extended-entry decision tables allow for…
For example, a condition “User’s income” may take…
limited entry decision tables.
conditions having multiple values which may represent discrete elements or sets of elements.
One of three possible values: “lower than 1000”, “between 1000 and 2000” and “more than 2000”.
Decision Tables - Intro (3.2.3)
Decision table testing starts with…
Rules containing infeasible combinations of condition values are…
Next, the Test Analyst should…
The Test Analyst should ensure the rules within the table are…
Designing decision tables based on the specification.
Excluded or marked as “infeasible”.
review the decision tables with the other stakeholders.
Consistent (i.e., the rules do not overlap), complete (i.e., they contain a rule for each feasible combination of condition values), and correct (i.e., they model the intended behavior).
Decision Tables - Intro (3.2.3)
The basic principle in decision table testing is that…
The rules form the test conditions.
Decision Tables - Intro (3.2.3)
When designing a test case to cover a given rule, the Test Analyst should be aware…
For example, the TRUE
value of the condition “age ≥ 18?” may require the tester to…
Similarly, the expected results of the test case may…
that the inputs of the test case might be different parameters than in the conditions of the decision table.
Calculate the age from the input parameters birth date and current date.
Be indirect consequences of the actions of the decision table
Decision Tables - Intro (3.2.3)
After the decision table is ready…
The rules need to be implemented as test cases by selecting test input values (and expected results) that fulfil the conditions and actions.
Collapsed decision tables (3.2.3)
When trying to test every possible input combination according to the conditions, decision tables can…
A complete limited-entry decision table with n conditions has…
A technique of systematically reducing…
When this technique is used…
In this resulting rule the values of the irrelevant conditions are…
For conditions with “don’t care” values, the Test Analyst may…
become very large.
2n rules.
The number of combinations is called collapsed decision table testing [Mosley93].
A group of rules with the same set of actions can be reduced (collapsed) to one rule if, within this group, some conditions are not relevant for the action, and all the other conditions remain unchanged.
denoted as “don’t care”, usually marked with a dash “-”.
Specify arbitrary valid values for test implementation.
Collapsed decision tables (3.2.3)
Another case for collapsing rules is when…
For example, in a decision table for card payments, if the condition…
a condition value is not applicable in combination with some
other condition values or when two or more conditions have conflicting values.
“card is valid” is false, the condition “PIN code is
correct” is not applicable.
Collapsed decision tables (3.2.3)
Collapsed decision tables may have far fewer rules than full decision tables, which results in…
If a given rule has “don’t care” entries, and only one test case covers this rule, only one of…
Hence, for high risk levels, in alignment with the Test Manager, the Test Analyst should…
A lower number of test cases and less effort.
Several possible values of the condition will be tested for that rule, so a defect involving other values may remain undetected.
Define separate rules for each feasible combination of the single condition values rather than collapsing the decision table.
Decision Tables - Applicability (3.2.3)
Decision table testing is commonly applied to…
It may also be applicable to…
This technique is particularly useful when…
Integration, system, and acceptance test levels.
Component testing when a component is responsible for a set of decision logic.
The test object is specified in the form of flowcharts or tables of business rules.
Decision Tables - Applicability (3.2.3)
Decision tables are also a requirements definition technique and sometimes requirements specifications…
The Test Analyst should still…
may already be defined in this format.
Participate in reviewing the decision tables and analyze them before starting test design.
Decision Tables - Limitations (3.2.3)
When considering combinations of conditions, finding all the interacting conditions can be…
Care must be taken when…
In the worst case…
challenging, particularly when requirements are not well-defined or not documented at all.
Selecting the conditions considered in a decision table so that the number of combinations of those conditions remains manageable.
The number of rules will grow exponentially.
Decision Tables - Coverage (3.2.3)
The common coverage standard for this technique is to cover…
The coverage is measured as…
each rule of the decision table with one test case.
The number of rules covered by the test suite divided by the total number of feasible rules, expressed as a percentage.
Decision Tables - Coverage (3.2.3)
Boundary value analysis and equivalence partitioning can be combined with the decision table technique, especially in the case of…
If conditions contain equivalence partitions that are ordered, the boundary values may…
extended-entry decision tables.
Be used as additional entries leading to additional rules and test cases.
Decision Tables - Types of defects (3.2.3)
Typical defects of decision table testing include…
During the creation of the decision tables, defects may be…
It is not unusual to…
The most common types of defects are…
Incorrect logic-related processing based on particular combinations of conditions resulting in unexpected results.
Found in the specification document.
Prepare a set of conditions and determine that the expected result is unspecified for one or more rules.
Omissions of actions (i.e., there is no information regarding what should actually happen in a certain situation) and contradictions.
State Transition Tables - Intro (3.2.4)
State transition testing is used to test the ability of the test object to…
Events cause the test object to…
Events may be qualified by…
For example, a login event with a valid username/password combination will result in…
This information is represented in a…
Enter and exit from defined states via valid transitions, as well as to try entering invalid states or covering invalid transitions.
Transition from state to state and to perform actions.
Conditions (sometimes called guard conditions or transition guards) which influence the transition path to be taken.
A different transition than a login event with an invalid password.
State transition diagram or in a state transition table (which may also include potential invalid transitions between states).
State Transition Tables - Applicability (3.2.4)
State transition testing is applicable for any software that has…
State transition testing can be used…
Embedded software, web software, and any type of transactional software are…
Control systems, e.g., traffic light controllers, are…
defined states and has events that will cause the transitions between those states (e.g., changing screens).
At any test level.
Good candidates for this type of testing.
Also good candidates for this type of testing.
State Transition Tables - Limitations (3.2.4)
Determining the states is often the most…
When the test object has…
For embedded software, the states may…
Difficult part of defining the state transition diagram or state transition table.
A user interface, the various screens that are displayed for the
user are often represented by states.
Be dependent upon the states of the hardware.
State Transition Tables - Limitations (3.2.4)
Besides the states themselves, the basic unit of state transition testing is…
A single transition is called…
A sequence of two successive transitions is called…
a sequence of three successive transitions is called…
In general, an N-switch represents…
With N increasing, the number of N-switches…
the individual transition.
Simply testing all single transitions will find some kinds of state transition defects, but more may be found by testing sequences of transitions.
A 0-switch;
A 1-switch;
A 2-switch, and so
forth.
N+1 successive transitions [Chow1978].
Grows very quickly, making it difficult to achieve N-switch coverage with a reasonable, small number of tests.