How to answer this interview question
I haven't done automation in a while and I thought I could answer any question thrown to me but apparently I didn't answer this one to their satisfaction and I'd like to know how others would have answers it. I include a rough idea of how I answered the question at the bottom.
On a white board , he drew three boxes (dialogs) representing information about any type of car; the question is agnostic to any particular language or program.
- Has two drop downs, the first is Year and the second is Make.
- Both dropdowns initially say "Please make a selection".
- The system displays any year, past, present, and future.
- The system displays any make, past, present, and future.
- If no make was produced in the selected year, display "No available makes" in the Make dropdown otherwise display Dialog2.
- It has one dropdown for Model
- The dropdown initially says "Please make a selection".
- The system displays any model, past, present, and future.
- After a selection is made, the third dialog appears.
- It displays the price of the car.
My thought process:
- The Automation System reads a YEAR file, picks a year, and selects that year from the Year dropdown.
- The Automation System reads a Make file, picks a Make with a matching year, and selects that make from the Make dropdown.
- Dialog2 is displayed.
- The Automation System reads a MODEL file, picks a model, and selects that model from the Model dropdown; Dialog3 is displayed.
- The system displays the price of the car.
I'm going to answer vaguely because that question looks similar to a hiring guideline I've written for a past company I consulted with 2 years ago in the Santa Monica, CA area.
What I wanted to test in the candidate with a question like that was the through process of how the programmer breaks down the problem and organizes the code. Imagine you had 100 tests that tested all the various aspects of that system. Think of the following things..
* How would you organize your code to promote reuse and maintainability?
* How would you organize your test data and expected results?
* What sort of frameworks would you use to report the results in a way that's useful and will help developers find the exact issue as quickly as possible?
I thought about your questions and I came up with what seem good responses, they company's I've talked to since seemed to like them. Instead of giving how to code examples, I focused on the areas you talked about. In general:
- I organize my framework, and thus test scripts, around main functional areas and use cases/scenarios.
- I make the scripts small so they perform a single task and can potentially be strung together.
- I abstract the general functionality from the specific.
- I create a library of useful/common actions.
- I separate the test data from the scripts.
- The scripts log information: The name of the test, Pass/Fail status, any other useful information.
- The scripts validate that they're on the right page before the start and after certain operations.
Thank you so much for sharing your views
Originally Posted by Sickmetal