1

I'm taking the ISTQB Foundation Level Certification Exam this Friday and while going over the sample exam on the ASTQB website I stumbled upon this question:

"You have been given the following conditions and results from those condition combinations. You can only have one form of payment. A PIN is only needed for a debit card. Given this information, using the decision table technique, what is the minimum number of test cases you would need to test these conditions?"

Conditions:

Valid cash
Valid credit card
Valid debit card
Valid PIN
Bank accepts 
Valid Selection
Item in Stock

Results:

Reject Cash
Reject Card
Error Message
Return Cash
Refund Card
Sell Item

Answers:

a. 7
b. 13
c. 15
d. 18

The answer is C. 15, but their explanation is simply a large decision table with all the combinations. This is great and all, but I don't have time to create a big, relatively complicated decision table with all 15 combinations/columns--I will only have 60 minutes to complete the 40 question test.

Is there an easier/simpler way to find how many combinations/columns/test cases would be needed to test these conditions?

Thanks!

6 Answers 6

3

I don't know on which ISTQB site you found the example but I found a PDF with examples here (see #24). In contrast to the exercise you posted, the example above mention the usage of a method called decision table technique.

You should solve it using decision tables because,

  1. you are in the context of ISTQB and should prepare yourself for the test and (more important) for your professional life.
  2. unlike the way of doing it as suggested by Tam Minh, you have a more formal way of "solving" those problems with the decision table technique.

Particularly, the second point is important when you have to explain yourself on what your resulting test cases are based on.

0

If I'm in this case, I will break down it based on the results, maybe the result not map with the answer but at least we have a number.

  • Reject Cash: invalid cash - 1 case
  • Reject Card: invalid card, Bank doesn't accept x2(credit/debit card) and invalid PIN for debit card
  • Return Cash: no item in stock - 1 case
  • Refund Card: no item in stock - 1 case x2 (credit/debit card)
  • Sell Item: all valid conditions - 1 case x3 (cash, credit/debit card)
  • Error Message: invalid selection - 1 case x3 (cash, credit/debit card)

Total cases: 15

Hope it helps :)

2
  • You counted the invalid PIN condition twice (one for credit card and one for debit card) but a PIN is only needed for debit card as stated in the question. May 26, 2016 at 16:29
  • I updated test cases based on your comment. Thanks :)
    – Tam Minh
    May 27, 2016 at 2:29
0

There is no alternative to hard work and knowledge gained. There is no shortcut way to derive the number of test cases without decision table or matrix created else you will make mistake or if you know the answer will try to reverse engineer and convince yourself with it with no real understanding and this wont help in your work life.

Best way is to practise and reduce time taken to derive the total number. I went through this and I am sure you will excel it as well.

All the best for your exam!

0

According to your solution, it looks like 13( 1+3+1+2+3+3) after adding the number. My opinion is,

Reject Cash: invalid cash - 1 case

Reject Card: invalid card, Bank doesn't accept x2(credit/debit card) and invalid PIN for debit card x1

Return Cash: for cash - 1 case

Refund Card: for card - 1 case x2 (credit/debit card)

Sell Item: Item in Stock - 1 case (Item in stock)

Error Message: any condition - 1 case x7

0

look at the very end of ASTQB-Exam-1-Answer-Table.pdf and you will see how they broke it down to come up with 15 minimum tests

enter image description here

0

The correct answer is C, 15.

To calculate the minimum number of test cases required to test these conditions, you can use the Decision Table technique. This involves considering each condition and combining them in various ways to cover all the possible combinations.

Let's take the example of two conditions A and B. For each condition, you can have two possibilities: True or False. The total number of combinations of A and B would be 2 * 2 = 4, which can be represented as:

A B

T T

T F

F T

F F

In the given problem, there are 7 conditions, each having two possibilities: True or False. The total number of combinations would be 2^7 = 128. However, we can reduce the number of test cases by eliminating redundant and impossible combinations.

For example, if the valid selection is not made, we don't need to check any other conditions or results. Similarly, if the item is not in stock, we don't need to check any other conditions or results.

The final number of test cases required would be the number of combinations of conditions that lead to unique results. In this case, 15 unique combinations lead to unique results. Hence, the minimum number of test cases required is 15.

Your Answer

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

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