ezeetester

Debunking the myth of solving an interview puzzle, in the one and only way

In Uncategorized on March 14, 2015 at 3:29 pm

David, Charles, Edwin and Fred are four candidates who have turned up for an interview.  This is for a position in software testing. David has just started reading about Epistemology.  Charles has practiced several puzzles passively(tries a little, but then simply memorizes the solutions). Edwin is a guy who is Sociable and his friendly demeanor helps him out in “situations”.  Frey never hesitates to ask for help from anyone

One typical question, asked in a testing interview is about the 3 vending machines. One has orange juice, the second has grape and the third has both (it vends alternatively).  The problem is all the machine labels are wrong.  How many coins do you need  to label all of them correctly.

Here is the answer provided by each candidate:

David: “I would go close to each and every machine and sniff.  I’ ll start with the machine labeled orange, If the vending machine smells like grape juice, I note it down I try to open the lid of the machine and see what is stocked inside, remove the jug taste a little and if it feels like grape juice I would change the label immediately.  Just  repeat this step for the other two machines. This way I may never have to use even one coin.”

Charles: Thinks for a while (I think I have read this somewhere) and then responds ” Since the labels are wrong, I would use that coin on the machine labeled (falsely) Grape/Orange and whatever juice comes out I will label accordingly. i.e. if grape comes out I’ll remove the label from the grape juice machine and exchange it. I will use 2  coins consecutively on the other machine and if it simply gives the same juice (Orange) consecutively I would label that as Orange, and this would make the other machine get the label Orange/Grape.”

Edwin: “I would get friendly with the housekeeping staff and ask them what juice was loaded in which machine and if necessary use one coin to eliminate other possibilities”

Fred: “I would simply use the coin on any machine and label it. For finding about other machines I would ask a few friends to lend me 2-3 coins and get the juice and finally label all of them. This way I am not using more coins from you”

The interviewer, is happy with Charles as they believe he figured out the right answer as it’s been on the web and he also thinks similarly.

This puzzle is basically about the misleading labels one would encounter in complex systems. However, I would give credit to everyone. Situations differ and scarcity of coins can be handled in different ways.

Are we headed towards Image driven Automation – using Sikuli ?

In Automation on March 6, 2014 at 5:11 pm

What do you do when your application has tons of UI issues?
Apart form the other issues, regressing on the UI issues can definitely be a pain, especially the clerical stuff that involves comparing 2 images (one from your app to the one in your UI design document). So why not use a tool that can be used exclusively on interfaces? The answer is a tool called Sikuli (www.sikuli.org). Although I have just started using it, I found this tool interesting because it can capture images of GUI elements of an application on your desktop, and gives you the option of locating other elements down to the exact pixel count as might be specified in your UI document.
Additionally you could also use it to test web applications by just using the link in a slide.  For beginners in automation this could be fun, if you want to customize your tests you may have to learn Python.  We have had Data driven automation, we have had Keyword Driven automation and we are probably on our way towards Image driven automation with Sikuli and moreover its free of cost.  There are lots of cool stuff you can do with Sikuli and it’s headed in the right direction.

Debunking the myth: There is only one system!

In System Analysis on September 23, 2012 at 1:28 pm

I have always been intrigued by a question –  Are there hidden systems?

I would say, sometimes – Yes

Why is this useful to a tester? It serves as one more layer of perception which could explain an existing feature, or a hidden functionality.

Lets talk of a real life example.  One of my colleagues went to get his blood tested in a lab.  He paid for the tests and got a receipt, which had an id number on it. He took this receipt and went to the lab assistant who would collect the blood samples.  The lab assistant collected blood in a vial and marked a number on it, the same number was then written on the receipt also.  This number was different from the receipt number, which made my friend ask “Why 2 numbers?”  To which the lab assistant said, that is for  “our reference”.  This new id used by the assistant was all that was needed to track the blood sample, ever since it was collected, to storing it, till the point of creating the reports.  In the event, my friend wanted to know the results of his blood test he had to make a phone call to the lab and provide the receipt number and answer a few questions before he could get his results.

Now the point in telling you the whole story is that, Have you ever wondered what could happen to an entity in a system, once it has been assigned a unique id? For all you know it may not be as unique as you think.  Whenever you come across a system do not rule out another system (internal or invisible or ghost or whatever you may call it) which may be using a whole new id to keep track of whatever the hidden system is supposed to do before it spews the result out to the “visible” system.  Even if you consider modelling this entire workflow of a person going to the lab for a test up to the point of collecting his reports, there are different systems that may have to interact and each system may have its own id and recognition methods for a particular instance.  Many a time we tend to overlook this, thinking that there is only one system at work.

 

 

%d bloggers like this: