Cal test requirements

De Software testing
Ir para: navegação, pesquisa

Equivalence partition

Considering the number of parameter x, two equivalence classes can be defined:

  • Valid: 0 <= x <= 2 (1)
  • Invalid: x > 2 (2)

Considering the cal program called with one parameter (the year), we have the following equivalence classes:

  • Valid: 1 <= year <= 9999 (3)
  • Invalid: year < 1 (4)
  • Invalid: year > 9999 (5)
  • Invalid: anything but a number (6)

Considering the cal program called with two parameter (the month and the year) we have the following equivalence classes:

  • Valid: 1 <= month <= 12 and 1 <= year <= 9999 (7)
  • Invalid: 1 <= month <= 12 and year < 1 (8)
  • Invalid: 1 <= month <= 12 and year > 9999 (9)
  • Invalid: 1 <= month <= 12 and year not a number (10)
  • Invalid: month < 1 and 1 <= year <= 9999 (11)
  • Invalid: month < 1 and year < 1 (12)
  • Invalid: month < 1 and year > 9999 (13)
  • Invalid: month < 1 and year not a number (14)
  • Invalid: month > 12 and 1 <= year <= 9999 (15)
  • Invalid: month > 12 and year < 1 (16)
  • Invalid: month > 12 and year > 9999 (17)
  • Invalid: month > 12 and year not a number (18)
  • Invalid: month not a number and 1 <= year <= 9999 (19)
  • Invalid: month not a number and year < 1 (20)
  • Invalid: month not a number and year > 9999 (21)
  • Invalid: month not a number and year not a number (22)