Equivalence Partitioning Introduction
This technique is applied to reduce the number of test cases needed to test an application.
It offers a systematic method of dealing with a potentially exhaustive number of test cases. It is not the only technique available, so although limited, when done in a timely manner, it can expose defects early in the lifecycle. This can then be followed up with a deeper look at the functionality of a system.
A partition is a grouping of items. An equivalence partition results when the behaviour of one item is expected to be the same as the behaviour of the others in the same partition. Continuing our Power Point example, this font is called Aptos (Body). I would expect that all letters will look the same as I type. I have now selected bold, now italics and bold, now just italics, now neither.
When using equivalence partitioning for designing tests, once we identify the partitions, we need to test only one item in each partition.
Equivalence partitioning can be identified for:
- Inputs and expected outputs (such as inputting 10 items and seeing a price of 10x the single unit price)
- Configuration items (such as setting up a slideshow in PowerPoint – I would expect to see the same menu each time
- Internal values – these are often not visible to the end user but could include looking up a username/password combination internally to check if there is a match to allow access to a system
- Time-related values – such as the time allocation for the use of your exam voucher, as they do expire
- Interface parameters – such as the currency used to purchase your exam voucher; the price paid will be calculated based on current exchange rates if not in local currency. The interface parameter in the code will be the exchange rate applied at the time of purchase.
Testers will also make decisions on whether a partition is:
- Valid – usually where the inputs and outputs are as expected, such as ‘enter email address’ would expect an @ sign – valid input partition
- Valid (again) – where an incorrect input results in a valid response, such as ‘please enter a valid email address’ – valid output partition
- Invalid – as above, where the email address does not follow the expected format and thus cannot be processed – invalid input partition
- Invalid (again) – where the response to an invalid email address entry is to immediately lock the account, whereas the specification requires a prompt to try again – invalid output partition.
