0

Scenario testing by example, Code Key Cabinet Digital Lock

Reading Time: 3 minutes

TL;DR

This post will present one Études for scenario software testing.

As I am learning Elixir and Phoenix, I found this excellent resource: Études for Elixir.

Études: A short musical composition, typically for one instrument, designed as an exercise to improve the technique or demonstrate the skill of the player.

I will try to give one Études that will help you to practice Scenario based testing. Why software tester should do scenario testing is explained in Michael Bolton’s blog post.

In order to be excellent software tester, I keep my health in gym, three times per week. Recently, I found on every locker new keypad.

There was a card with following instructions:

  1. In order to lock your locker, select four digits (e.g. you year of birth), close the door and press green button.
  2. When you try to open your locker but you entered wrong password, press red button and try again.
  3. If you are stuck, contact person at the gym desk.

One service that gym offers is personal locker. You have to pay for this service.

With this information, can you think of important scenarios that must be covered before releasing that keypad to production? I will give mine at the end of the post.

Here are my testing notes.

  • Information: Giving hints about user password on instruction card is security issue. Best password is random number.
  • Information: If you enter password keys too fast while unlocking locker, correct password will not be accepted
  • Information: It is not practical to enter your password while locker doors are open. It is ok to close the door and then select your password and press the green button.
  • Question: how many times can I enter wrong password?
  • Information: Red light means that lock is locked, green that is opened. This represents status of locking unit.
  • Information: When you enter your selected password and press green button and you try immediately to open locker door, you can open it! Lock needs some time to lock the door.
  • Information: Some locks can not accept password in unlock state (green button)

Using this Google search: “simple magnetic gym lock with keypad” I found web page for this item.

From the specification, I recovered following information:

  • product has master or jump code. This answer how desk person can help you when you are stuck.
  • Emergency open: When battery power off and can’t open lock, at this time can use a external power supply to insert into a socket of lock to supply power to open lock. Ok, no need to break and enter 🙂
  • 1-10 numbers, you can set password as you want. Hmm, password can be 1 digit long?
  • Each lock has corresponding serial number which must be provided even if admin forgets password.
  • If you enter wrong password three times in a row, keylock motherboard will auto lock for five minutes.

And here is important scenario.

User does not leave locker in opened state! And in that way it gets personal locker service for free.

Instruction card mentioned that scenario. At the end of day, admin will unlock all lockers, all found stuff will be put in found items box.

Other scenarios:

  • For opened locker, pick four digit password, and check that locker is really locked
  • Open your locked locker
  • Enter wrong password for three times and ask for assistance
  • Set admin password
  • Set password that has no four digits
  • Batteries are dead while locker was closed.
  • Use the force for locked locker
  • Try to unlock with very long password

Can you add more scenarios?

Point is, product number of variables makes scenario testing more complex. We need to sample scenarios from pool of possible scenarios based on context of our product.

And at the entrance of gym locker room, there is following statement:

For items of value, please use safe at the reception 🙂

Previously, we had simple locks with keys. With new digital key locks, we have more complex situation, but that did not added any new value for gym users, because valuable stuff still needs to be put in reception safe!

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Karlo Smid

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.