2

I need to know the different situations when can I use equivalence partitioning technique and when to use decision table technique. A lot of situation I feel that I can use equivalence partitioning instead of decision table and vice versa. In the example below (I got it from guru site). Decision table technique is used, my question we don't use equivalence partitioning?. Please advice

Example: Consider a dialogue box which will ask the user to upload a photo with certain conditions like – You can upload only '.jpg' format image file size less than 32kb resolution 137*177.

4
  • 2
    Equivalence Partitioning and Decision Tables are two very different things - are you sure that's what you're meaning to compare?
    – dvniel
    Mar 19, 2018 at 8:35
  • Your example is missing.
    – FDM
    Mar 19, 2018 at 8:49
  • I need to know when each technique is used. this is what I meant by "What is the difference between the two techniques" Mar 19, 2018 at 10:12
  • 2
    Simon Jishi, could you point a scenario where there might be confusion regarding which one to use ? Mar 19, 2018 at 11:23

2 Answers 2

4

The website you're referencing has very good explanations and examples of decision tables and equivalence partitioning (used below). These are very different techniques and can't be used interchangeably.

Decision table testing is a testing technique used to test system behavior for different input combinations.

For example: Decision Table example


Whereas Equivalance Partitioning is testing technique used to divide the set of test conditions into partitions, and then a single value from each of those partitions are tested.

For example: EP example

So here, the only valid input is a number between 1 and 10. Anything outside of that range is considered invalid.

If you're still confused, I'd recommend re-reading the two articles and noting down the highlights and differences - it's pretty clear imho.

Edit: Also check out these explanations, examples and definitions from istqbexamcertification.com on Decision Tables and Equivalence Partitioning

2
  • but in the scenario I gave above, I can use equivalence partitioning technique. Example: The image format input can be partitioned into jpg as valid input and another format as invalid input Size can be partitioned can also partition into 32 as valid and > 32 as invalid. Same applies for resolution. After partition, we can derive test cases. For this, I have asked when can we use the techniques. Mar 19, 2018 at 12:55
  • @SimonJishi. Well, your example is more like a switch - it's either less than 32kb, or more than 32kb. The same goes for the format and resolution... they're either true or false, which is ideal for decision tables. Equivalence Partitioning doesn't really work in your example, so you wouldn't use it here.
    – dvniel
    Mar 19, 2018 at 13:22
2

I have the same concern as you did. Sometimes when applying these two techniques resulting in the same list of test cases. Sometimes after applying equivalence partitioning, and then decision table, I found some duplicates. So what I usually do is, I applied both of the techniques, then review the result quickly to remove duplicates test cases. I don't think this is the best way to do as it cost time, but I don't have a better idea at the moment.

Let's use your example above and give it a try, there are three conditions from the requirement which system would allow you to upload the image:

  1. Image format: JPG
  2. Image size: < 32kb
  3. Image resolution: 137 px * 177 px

If we use equivalence partitioning we will find out below classes:

1.1. Image format : JPG (Valid)

1.2. Not image format = JPG (Invalid)

1.2.1. Image but format != JPG (Invalid sub-class)

1.2.2. Not image like a document, pdf, etc. (Invalid sub-class)

2.1. 0kb < Image size < 32kb (Valid class)

2.2. Image size >= 3kb (Invalid class)

2.3. Image size = 0kb (Invalid class)

2.4. Image size too big (Invalid class) // We can add this kind of class easily when using this technique.

3.1. Image resolution = 137 px * 177 px.

3.2. Image resolution != 137 px * 177 px.

Ooh, it's quite long so I guess I won't do the decision table, but there are some points I can tell at this stage.

  1. You can apply equivalence partitioning in this requirement, or decision table, or both of them, and what value we would gain if we apply both of them, details are in following points.
  2. Partitioning can offer cases which can be missed out by decision table like 1.2.2, 2.3, 2.4
  3. Decision table can be a better choice to find some cases for example the third condition, we don't want to test just two cases for this condition (137 * 177 OR not), we want to test more cases like 137 * 176 (< 177), or 137 * 178 (>177), in this case draw a table make thing much easier. Refer below images. enter image description here

My conclusion is: Use both if you got time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.