Home
Existing User Login
Brochure
Sign up for Risk-Free Trial
About Testcover.com
Frequently Asked Questions
Tutorial with Examples
->Need for the Service
->Submitting Requests
->Reading Results
->Configuration Example
->Constraints Example
->Calendar Example
->Database Table Example
->Equivalence Partitioning
->UML State Machines
->Definitions of Terms
Performance
WSDL Interface
Background
Partners
Registrations
Contact Information
|
The constraints example shows how to generate test configurations for a networked computer system that has constraints
among browsers and operating systems.
There are five test factors with values as follows.
| Test Factor | Number of Values | Test Factor Values |
| 1. Operating system | 4 | XP MacOS Linux Vista |
| 2. Display resolution | 3 | low medium high |
| 3. Connection | 4 | wi-fi dsl cable lan |
| 4. Browser | 4 | IE Firefox Opera Safari |
| 5. Application | 3 | App1 App2 App3 |
The test cases need to be constrained to include only supported configurations.
In this example the IE browser runs on XP and Vista; Firefox and Opera run on all 4 of the operating systems;
and Safari runs on XP, MacOS and Vista.
The supported configurations are included by using multiple blocks which are defined so that the union of their test cases
spans all the allowed test cases.
This can be done with 3 blocks in this example:
| On XP, MacOS, Linux or Vista run Firefox or Opera |
| On XP or Vista run IE or Safari |
| On MacOS run Safari |
There are various ways to choose the blocks.
The key here is that any test case defined by a block is allowed.
When the blocks are taken together, they define all the allowed test cases and no disallowed ones.
It is possible to specify blocks that are disjoint or overlapping in various ways.
These block definitions are equivalent when they include all the allowed combinations.
However different block definitions lead to minor variations in the resulting test cases.
The following request illustrates the constraints example with the 3 blocks chosen above.
(The text following the plus (+) on the first line of the block is an optional comment.)
Constraints Example
Operating System
Display resolution
Connection
Browser
Application
#
+ (XP MacOS Linux Vista) with (Firefox Opera)
XP MacOS Linux Vista
low medium high
wi-fi dsl cable lan
Firefox Opera
App1 App2 App3
+ (XP Vista) with (IE Safari)
XP Vista
low medium high
wi-fi dsl cable lan
IE Safari
App1 App2 App3
+ MacOS with Safari
MacOS
low medium high
wi-fi dsl cable lan
Safari
App1 App2 App3 |
The results table is shown below.
It has columns for a Test Case ID, for each test factor and for a Combo Countdown.
The top row of the table labels these columns.
The next row shows the number of values for each factor and the total number of factor value pairs
in the Combo Countdown column.
Test Case ID |
Operating System |
Display resolution |
Connection |
Browser |
Application |
Combo Countdown |
|
| 4 Values | 3 Values | 4 Values | 4 Values | 3
Values | 129 |
| 1 | MacOS | low | lan | Opera | App1 | 119 |
| 2 | Vista | high | wi-fi | Opera | App2 | 109 |
| 3 | Linux | medium | cable | Opera | App3 | 99 |
| 4 | Vista | medium | dsl | Firefox | App1 | 89 |
| 5 | XP | low | lan | Firefox | App3 | 80 |
| 6 | MacOS | high | cable | Firefox | App2 | 71 |
| 7 | MacOS | medium | wi-fi | Safari | App3 | 62 |
| 8 | XP | low | wi-fi | IE | App1 | 54 |
| 9 | Linux | low | dsl | Opera | App2 | 47 |
| 10 | Vista | low | cable | Safari | App3 | 40 |
| 11 | XP | medium | dsl | IE | App3 | 34 |
| 12 | XP | high | cable | IE | App2 | 28 |
| 13 | Vista | medium | lan | Safari | App2 | 22 |
| 14 | MacOS | high | dsl | Safari | App1 | 16 |
| 15 | Linux | high | lan | Firefox | App2 | 12 |
| 16 | Linux | medium | wi-fi | Firefox | App1 | 9 |
| 17 | XP | high | cable | Opera | App1 | 7 |
| 18 | XP | high | wi-fi | Safari | App3 | 5 |
| 19 | Vista | low | dsl | IE | App2 | 4 |
| 20 | XP | low | lan | IE | App1 | 3 |
In this example there are
| 4 3 | + 4 4 | + 4 4 | + 4 3 |
| + 3 4 | + 3 4 | + 3 3 |
| | + 4 4 | + 4 3 |
| | | + 4 3 | = 129 |
uncovered pairs of values before any test cases are run.
The row labeled 1 gives the values of the test factors for the first test case.
It also shows that after the first test case is run, 119 pairs of values remain uncovered.
(10 pairs of values are covered by each of the first four test cases.)
Successive rows give the generated test cases with their corresponding numbers of uncovered factor value pairs
in the Combo Countdown column.
After test case number 20, all but three pairs of values are covered.
These are the three unsupported combinations which cannot be tested:
Linux with IE, Linux with Safari, and MacOS with IE.
In this example
there must be at least 4 4 = 16 test cases to include the pairs of values
for the two factors with the most values (4).
If there were no constraints, the generator would produce exactly 16 test cases here.
However because there are constraints in the test system, a few additional test cases are required.
|