Testing Challenge #11 - Combinatorial testing

Functionality

In this field you can specify the price for a item. The following rules will apply:

  • You can add in the field a maximum of 12 characters.
  • You can add numbers (0 to 9), commas or dot (commas are for thousand and million separator and the dot is used as decimal separator).
  • You can have or not thousand and million separators.
  • Thousand and million separator have to be used in the same time, if it is the case. (you cannot use in a million number just thousand separator e.g. 1256,678.34 will considered invalid)
  • The price can have maximum 2 decimals.(if there are more the number will be considered invalid; eg 1,345.342 will be considered invalid))
  • If there is no value after the decimal separator the separator will be eliminated ( eg. 345,234. will be considered as 345,234)

A diagram of the algorithm can be found here.


What to do

Your purpose is to test the price validator algorithm with valid and invalid values for all combinations of:

  • No thousand separators / Thousand separator / Million separator
  • No decimals / One decimal / Two decimals / More then 2 decimals

Your purpose is not to test any thing related to length or content (other than numbers zero to nine, commas or dot). You have also access to the validator log.

There is a inconsistency in the algorithm. If you have not spotted it yet, this will help.

Checks found: out of 29

Validator log

    received price of=
    checking if price<>NULL
    price is NULL