Testcover.com Testcover.com
Tutorial - Database Table Example

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 database table example shows how to use the generator to create records for testing a reservation system. In this example multiple blocks are used to accommodate dependencies among the factor values.

The GreatM Motel Chain (a fictional company) is implementing an expansion program. It is building three new motels with innovative features and amenities. GreatM also is updating its reservation system to reflect these improvements. The software engineers working on the reservation system have migrated the old database to the new system for testing. However they need additional data to represent the motels under construction and their new features.

The motel room database table has columns (factors) as follows.

Test FactorNumber of Values Test Factor Values
1.Location ID -[unique motel identifier]
2.Room ID -[unique room identifier]
3.Room type 3single standard suite
4.Section 3floor_1 mezzanine tower
5.Smoking 2no yes
6.Beds 3single 2_queen 1_king
7.Convertible couch 2no yes
8.Near gym/spa 2no yes
9.Near business center 2no yes
10.Wi-fi 2no yes
11.Phone lines 21 2
12.Balcony/patio 2no yes

The engineers will use three Location ID values to represent the new motels. They will generate rows of data including all pairs of values for all the columns except the Room ID. (Each Room ID value should appear only once in the table.) The engineers will assign a single value as a Room ID placeholder to generate the rows. Then they will assign unique values to the Room IDs in the resulting rows (test cases).

The three Room types define the allowed values for the other columns as follows.
• Each single room is located on floor_1 or in the tower in any of the new motels. Smoking may or may not be allowed. The single room has a single bed and does not have a convertible couch. It is not near a gym/spa or a business center. The room does not have wi-fi, but it does have 1 phone line. It does not have a balcony/patio.
• Each standard room is located in any section of any of the new motels. Smoking may or may not be allowed. The standard room has either 2 queen size beds or 1 king size bed. It does not have a convertible couch. The standard room may or may not be near a gym/spa or a business center. The room may or may not have wi-fi, and it does have 1 phone line. The standard room may or may not have a balcony/patio.
• Each suite is located in the mezzanine or tower of any of the new motels. Smoking may or may not be allowed. The suite has 2 queen size beds and a convertible couch. The suite is near a gym/spa and a business center. It has wi-fi and 2 phone lines. The suite also has a balcony/patio.

These rules are described in the three blocks (one for each Room type) in the request below.
Database Table Example
Location ID
Room ID
Room type
Section
Smoking
Beds
Convertible couch
Near gym/spa
Near business center
Wi-fi
Phone lines
Balcony/patio
#
+ single room
location_1 location_2 location_3
room_ID
single
floor_1 tower
no yes
single
no
no
no
no
1
no
+ standard room
location_1 location_2 location_3
room_ID
standard
floor_1 mezzanine tower
no yes
2_queen 1_king
no
no yes
no yes
no yes
1
no yes
+ suite
location_1 location_2 location_3
room_ID
suite
mezzanine tower
no yes
2_queen
yes
yes
yes
yes
2
yes

The results table follows. All allowed pairs of factor values are included in the 15 test cases.

#1.
Test
Case ID
Location ID Room ID Room type Section Smoking Beds Convertible couch Near gym/spa Near business center Wi-fi Phone lines Balcony/patio Combo
Countdown
3 Values1 Value3 Values3 Values2 Values3 Values2 Values2 Values2 Values2 Values2 Values2 Values332
1location_1room_IDsinglefloor_1nosinglenononono1no266
2location_2room_IDsuitemezzanineyes2_queenyesyesyesyes2yes200
3location_3room_IDstandardtowerno1_kingnonoyesyes1yes150
4location_3room_IDstandardfloor_1yes1_kingnoyesnono1no120
5location_2room_IDstandardtowerno2_queennononono1no99
6location_1room_IDstandardmezzanineno1_kingnoyesnono1yes84
7location_1room_IDsuitetoweryes2_queenyesyesyesyes2yes71
8location_3room_IDsuitetowerno2_queenyesyesyesyes2yes64
9location_2room_IDsinglefloor_1yessinglenononono1no58
10location_3room_IDsingletowernosinglenononono1no54
11location_3room_IDstandardmezzanineno2_queennoyesnoyes1no50
12location_2room_IDstandardfloor_1no1_kingnoyesyesno1yes46
13location_1room_IDstandardfloor_1yes2_queennonoyesyes1yes44
14location_1room_IDstandardtoweryes2_queennoyesyesyes1no43
15location_2room_IDstandardmezzanineyes2_queennonoyesyes1yes42

After the unique Room ID values are set, the new rows for the database table are as given below.

Location ID Room ID Room type Section Smoking Beds Convertible couch Near gym/spa Near business center Wi-fi Phone lines Balcony/patio
location_1room_1singlefloor_1nosinglenononono1no
location_2room_2suitemezzanineyes2_queenyesyesyesyes2yes
location_3room_3standardtowerno1_kingnonoyesyes1yes
location_3room_4standardfloor_1yes1_kingnoyesnono1no
location_2room_5standardtowerno2_queennononono1no
location_1room_6standardmezzanineno1_kingnoyesnono1yes
location_1room_7suitetoweryes2_queenyesyesyesyes2yes
location_3room_8suitetowerno2_queenyesyesyesyes2yes
location_2room_9singlefloor_1yessinglenononono1no
location_3room_10singletowernosinglenononono1no
location_3room_11standardmezzanineno2_queennoyesnoyes1no
location_2room_12standardfloor_1no1_kingnoyesyesno1yes
location_1room_13standardfloor_1yes2_queennonoyesyes1yes
location_1room_14standardtoweryes2_queennoyesyesyes1no
location_2room_15standardmezzanineyes2_queennonoyesyes1yes

<Calendar Example HTML Form Example>

Copyright © 2003-2017 Testcover.com, LLC. All rights reserved.