Testing Problems: Not Just for Testers!
Although testers are obviously asked more testing problems, developers will often be asked testing problems as well. Why? Because a good developer knows how to test their code!
Types of Testing Problems:
Testing problems generally fall into one of three categories:
- Explain how you would test this real world object (pen, paperclip, etc).
- Explain how you would test this computer software (e.g., a web browser).
- Write test cases / test code to test this specific method.
We’ll discuss type #1, since it’s usually the most daunting. Remember that all three types require you to not make assumptions that the input or the user will play nice. Expect abuse and plan for it.
How to Test A Real World Object
Let’s imagine that you were asked to test a paperclip. The first thing to understand is: what is it expected to be used for and who are the expected users. Ask your interviewer—the answer may not be what you think! The answer could be “by teachers, to hold papers together” or it could be “by artists, to bend into new shapes.” These two use-cases will have very different answers. Once you understand the intended use, think about:
» What are the specific use cases for the intended purpose? For example, holding 2 sheets of paper together, and up to 30 sheets. If it fails, does it fail gracefully? (see below)
» What does it mean for it to fail? Answer: “Failing gracefully“ means for the paperclip to not hold paper together. If it snaps easily, that’s (probably) not failing gracefully.
» Ask your interviewer—what are the expectations of it being used outside of the intended use case? Should we ensure that it has a minimum of usefulness for the other cases?
» What “stress” conditions might your paperclip be used in? Answer: hot weather, cold weather, frequent re-use, etc