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:
- Image format: JPG
- Image size: < 32kb
- 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.
- 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.
- Partitioning can offer cases which can be missed out by decision table like 1.2.2, 2.3, 2.4
- 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.
My conclusion is: Use both if you got time.