As a QA engineer you often will be assigned tocheck if certain business logic is correct. Your company develops a special machine (hardware + software), designed to be put at the entrance of abar, where people come for a drink. The machine shouldcheck the ageof people when they try to enter and tell them, if they areallowed to walk in.
You are assigned totest the machine, which reads the personal ID card, extracts theage of the personfrom it (integer number), and displays appropriatemessageto each visitor,based on the age. The machineopens the doorwhen the person is allowed to enter the bar.
By design the machine should implement thefollowing logic:
Check visitor’s age and print appropriate message
--
If age > 0, and age < 18, then print “You are too young to visit our bar“. The door stays closed. If age > 18, then print “Welcome to our bar. Enjoy!” and the door opens. Otherwise, print “Invalid age. Please try again“.
Do you findany issuesin the above logic?
What is themistake (error)in the above logic?
How do we call the situation when we have awrong logic in the code? Name it.
What will be theresult, if werun the code, which implements the wrong logic?
What is the mistake (error) in the above logic? – There isn`t a equal = 18.
How do we call the situation when we have a wrong logic in the code? Name it. – Bug
What will be the result, if we run the code, which implements the wrong logic? – The machine will not allow people who are at 18. We will lost clients.
Test if the machine can recognize false ot fake ID.
As a QA engineer you often will be assigned to check if certain business logic is correct. Your company develops a special machine (hardware + software), designed to be put at the entrance of a bar, where people come for a drink. The machine should check the age of people when they try to enter and tell them, if they are allowed to walk in.
You are assigned to test the machine, which reads the personal ID card, extracts the age of the person from it (integer number), and displays appropriate message to each visitor, based on the age. The machine opens the door when the person is allowed to enter the bar.
By design the machine should implement the following logic:
Check visitor’s age and print appropriate message -- If age > 0, and age < 18, then print “You are too young to visit our bar“. The door stays closed. If age > 18, then print “Welcome to our bar. Enjoy!” and the door opens. Otherwise, print “Invalid age. Please try again“.Do you find any issues in the above logic?
What is the mistake (error) in the above logic?
How do we call the situation when we have a wrong logic in the code? Name it.
What will be the result, if we run the code, which implements the wrong logic?
What is the mistake (error) in the above logic? – There isn`t a equal = 18.
How do we call the situation when we have a wrong logic in the code? Name it. – Bug
What will be the result, if we run the code, which implements the wrong logic? – The machine will not allow people who are at 18. We will lost clients.
Test if the machine can recognize false ot fake ID.