0

Assume there are two elevators programmed for stopping in odd and even floors.

i) What kind of test we need to do to ensure that the elevators working fine without any hassle.

ii) What are the different scenarios to be considered while designing this model.

I covered few of the base cases like,

  • Checking boundary value analysis ( with Minimum floors(Include number of basements) and maximum floors)
  • Different floors serving request based on whether the input is odd/even which elevator to serve the request.
  • Say if a odd elevator going down/up and getting another odd floor request which is greater/lesser than current floor respectively, then this request has to served only after all the buttons got reset inside the floor and same for even elevator .

Any other corner cases to be considered? or Am I missing any base conditions itself?

P.S: This question is not an homework or assignment. I was asked this question in an interview.

  • Is it a kind of homework? – Alexey R. May 22 '18 at 10:08
  • We seem to be getting lots of homework questions on here lately - even more than usual. @irs102info, I'm not going to give any answers (that's not what we're here for, unfortunately) but will say that I think you mean Equivalence Partioning - not Boundary Value Analysis. There aren't any values beyond the minimum or maximum that can be tested. – trashpanda May 22 '18 at 10:14
  • @theonlydanever, It's not an homework or any assignment. I got this question in an interview, where I told all the above scenarios. But still the interviewer was not satisfied with my coverage. Just to update my skills further I posted here. – irs102info May 22 '18 at 11:39
  • @AlexeyR. Nope it's not homework or any assignment, I was asked this question in an interview. Just gathering different ways to think. – irs102info May 22 '18 at 11:39
  • It really doesn't make any difference whether it was homework or an interview - it's not a real-life question whose answer might actually matter. Presumably the interview is over, and you will get the job or not according to how you answered then – George M Oct 19 '18 at 21:30
0

I would start with firing off some questions, the specifications are not clear enough the make even the most basic test cases:

  • I am assuming that one elevator is configured to do only even floors and one only for odd floors, is this correct?
  • Are both elevators able to visit the ground floor? Let's assume they are.
  • When on the ground floor, how does the user request an elevator? Is there one button? Are there two buttons for odd/even stories? Is there a button for every story? Or are there separate buttons for odd up/odd down/even up/even down?
  • On other floors, what buttons are available to request an elevator?
  • What happens when one of the elevators breaks down? Is it possible to use the other elevator for all stories? Do both elevators have buttons to access any story (odd and even)? Is there visual indication in the elevator of which stories are available and which not?

Dependent of the answers of the above questions, you can write specific odd/even testcases.

There's loads more testcases you could write for elevators in general, but the most interesting here is the behavior with the odd/even requirement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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