Testcover.com
Tutorial - Calendar Example

Home
Existing User Login
Brochure
Sign up for Risk-Free Trial
About Testcover.com
Frequently Asked Questions
Tutorial
->Definitions of Terms
->Need for the Service
->Submitting Requests
->Reading Results
->Configuration Example
->Constraints Example
->Calendar Example
->RDF/XML Example
Performance
Background
Partners
Subscription Prices
Promotion Activations
Student Subscriptions
Privacy Policy
Terms & Conditions
Contact Information


The Calendar Example below illustrates the use of the test case generator with error conditions. This situation is different from the previous example which had impossible combinations to avoid. Here there are combinations which need to be tested, but they reflect abnormal conditions. These combinations lead to "rainy day" test cases which must be handled differently than "sunny day" cases.

Consider a calendar system which has three test factors with values as follows.

Test FactorNumber of ValuesTest Factor Values
1. Month12 jan feb mar apr may jun jul aug sep oct nov dec
2. Day7 1 10 28 29 30 31 32
3. Year32003 2004 2005
The tester plans to try several allowed dates, including first and last days of each month. She also will try problem dates beyond the month boundaries (e.g. jan with 32) to check that the system handles error cases correctly. One error test case that could be generated is
jan322003
This test case covers three combinations, one of which is jan with 2003. If this is the only test case with the jan-2003 combination, there could be a gap in exercising the normal operation of the calendar. The tester knows that the calendar system behaves differently during error handling, so she plans to cover the jan-2003 combination with a normal day (smaller than 32).

This is easily accomplished with two partitions, one for normal dates and one for months that are too long. There are constraints among the factor values in both partitions due to the varying month lengths. Thus both partitions have multiple blocks. Any combination of values in a block is an allowed test case.

The request for this example is shown below.
Calendar Example
Month
Day
Year
#ok All good dates
jan feb mar apr may jun jul aug sep oct nov dec
1 10
2003 2004 2005
+ long month last day
jan mar may jul aug oct dec
31
2003 2004 2005
+ short month last day
apr jun sep nov
30
2003 2004 2005
+ feb last day
feb
28
2003 2005
+ leap day
feb
29
2004
#err Too long month
+ too long long month
jan mar may jul aug oct dec
32
2003
+ too long short month
apr jun sep nov
31
2004
+ feb too long, regular year
feb
29
2005
+ feb too long, leap year
feb
30
2004

The two results tables follow. This example illustrates the use of Test Case ID prefixes (ok and err) to distinguish between test cases from different partitions. Optional partition comments also are shown.

Note that the jan-2003 combination is covered in both partition results.

#1. All good dates
Test
Case ID
MonthDayYearCombo
Countdown
12 Values6 Values3 Values126
ok1jan12003123
ok2jan102004120
ok3feb102003117
ok4feb12005114
ok5mar12004111
ok6mar102005108
ok7may312005105
ok8aug312004102
ok9oct31200399
ok10nov30200496
ok11apr30200593
ok12jun30200390
ok13feb29200487
ok14apr1200385
ok15apr10200483
ok16may10200381
ok17jun1200479
ok18jun10200577
ok19jul1200375
ok20jul10200473
ok21aug10200371
ok22aug1200569
ok23sep10200367
ok24sep1200465
ok25oct10200463
ok26nov10200361
ok27nov1200559
ok28dec10200357
ok29dec1200455
ok30jul31200553
ok31dec31200551
ok32jan31200549
ok33mar31200347
ok34sep30200545
ok35feb28200343
ok36may10200442
ok37may1200541
ok38oct1200340
ok39oct10200539
ok40feb28200538

#2. Too long month
Test
Case ID
MonthDayYearCombo
Countdown
12 Values4 Values3 Values96
err1jan32200393
err2apr31200490
err3feb29200587
err4feb30200484
err5mar32200382
err6may32200380
err7jul32200378
err8aug32200376
err9oct32200374
err10dec32200372
err11jun31200470
err12sep31200468
err13nov31200466

<Constraints Example RDF/XML Example>

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