Amazon Interview Question
Software Engineer in Testslike muhammd said
start by testing all possible scenarios for each of the parts in the system
queues, processor, and logger
for queues check enqueue dequeue operations,case of empty queues,
for processor, cases like read failure write failure, what happens if the power is lost during reading, during writing, what back up mechanism?? make sure the processor reads and writes at exactly hour apart.
a logger can have several scenarios since it connects to the database. what happens when there are no files, what does it write to database, power failures, back up mechanisms, database failures, connection failures,
Then go to the interface testing. what will the processor do if the queue is empty.
if it fails to read data, then what happens to the logger, what would it write to the database.
i would start with testing each of them independently (queue, processor and logger) for all possible scenarios. For example; for a queue i would test the push, pop, isempty and other such functions for different states of the queue. Same for the processor and logger by creating a stub queue for processor and a stub processor for logger.
- intuidev January 19, 2010