Insights Blog Raina Dey Scenarios: Negative Testing at the Casino


Raina Dey Scenarios: Negative Testing at the Casino

Raina is at the Casino breaking the classic Black Jack. Raina loves to discuss testing and breaking things, even at her age! So bring your comments and questions!

Raina Dey

Welcome, my children.  My name is Rana Dey, and yay, they let me come back for my next adventure.  Did you miss me?  The editors here seemed to like how my name fits with this column title (where they added an ‘i’ to my first name), so good for them!  But it gives me another chance to talk to you about figuring out where things might break.  Remember, it is just an app; it has no feelings, and your job is to break it if possible by negative testing.

So, today let’s go to something I enjoy but have never been addicted to: gambling, specifically blackjack.  Blackjack (also known as twenty-one) is a casino gambling game that is also popular as an online game.  Wikipedia says that it is the most widely played casino banking game in the world.  Please do not confuse this with black jack, a British card game that has nothing to do with gambling.  Some casinos have special payouts for special card combinations – that’s really just a math change for positive scenarios.  So our target today will be negative testing on an online blackjack game.

Let me explain the rules for those of you unfamiliar with this game.  Your pile of money is called the “pot”. Using a standard 52-card deck, the dealer deals everyone 2 cards: one face up and one face down.  The goal is to get as close to 21 points as you can without going over (going over is called “going bust”), where you win if you do a better job of this than the dealer.  Aces count as 1 or 11 (it drops to 1 if 11 puts you over 21), number cards count as their number, and cards with royalty count as 10.  Each player then chooses, one-by-one, if they want another card.  If you go over 21, you automatically lose.  If you stop before going over 21, the dealer takes more cards unless their total is 17 or over.  Whoever is closest to 21 without going over wins.  If you tie each other, you get your bet back; otherwise, you either lose your bet or get double your bet back.  Also, if you begin by being dealt 2 of the same card (just different suits), you can pretend that they are each a separate player and proceed from there (this is called a “split”).

I bet you didn’t know that I find casino math to be fascinating.  My previous problem, negative testing for an ATM, had more possibilities.  Keep in mind, we are only going to focus on negative testing.  So let’s just move onwards to the oopsies.

1. Pre-game stuff

a. Name is blank or white space only (some may find this OK; I don’t!)

b. User specifies starting cash amount that is non-numerical, 0, or negative

2. Placing bets

a. Bet value is negative amount

b. Bet value is 0

c. Bet value is non-numerical

d. Bet value is positive but under the minimum bid allowed

e. Bet value uses a precision beyond the smallest acceptable increment (like 10.1234567)

f. Bet (non-split) exceeds player’s pot

g. (First bet + split bet) exceeds player’s pot

3. Game play

a. Player’s response to “Hit Me or Pass?” is neither

b. If there was a split, and one side of your split goes bust, you must ensure that the other can still play instead of getting shut down too (it is debatable if this is negative testing)

c. I think that everything else is really positive testing, regardless of who goes bust

4. End of game

a. Player has less than minimum bet

b. Player’s response to “Play another hand or quit?” is neither

5. Other

3a (“Hit me or pass?”) reminds me that a communications break could happen anywhere during game play — the user can simulate this by pulling their Ethernet cable or turning off wi-fi; this should be attempted everywhere in the app


Can you think of anything else?  This one was too easy.  I’d like to do another longer one like the ATM.  Please write in comments below this blog post and help this list become more complete if you can find anything I may have missed, or suggest what we should test next time.  The QA process means always learning new things; please feel free to share with me.

P.S. Those are not my real hands in the photo above; I’m not quite that old.