Ferozeh dot Com



Expert advice on tech interviews !

about ferozeh


Ferozeh !

Testing Guidelines

Almost everywhere you will ever interview for a programming job you would invariably be asked testing questions. Very often, the interviewer asks you to code a particular task and then have you explain to him the test cases you would perform in order to have your code tested.

There are a ton of books on test-cases with complex techniques and theories but in my experience the best test-cases are a combination of simplicity and creativity. Usually the questions asked in an interview aren't too complex otherwise you wouldn't be able to complete them for your interviewer in the allotted time. Therefore the test cases for these questions aren't too complex either. Here are the broad categories of test cases that can almost always be applied to any question.

Correctness

The very first test case would test if what you coded works properly. This is called testing for correctness i.e. the results are correctly output for an average instance of your problem. Say you just coded a sorting algorithm then does your algo correctly sort an array of five or six integers.

Boundary Cases

This is a crucial !