07 November 2010

Testing is Fun and Brain Intensive - Why

Why testing is fun and Why testing has to be brain intensive

Before answering it, let us do this exercise.

Let us take one of the primitive types - "int" in Java and an arithmetic operation addition (imagine that you are testing Java compiler that will be used by developers/testers worldwide). What are things that you would do to verify the correctness of addition for "int". For now, let us focus only on integer addition alone. List down the things that you will learn (meaning that you should know) for completing the task. This exercise will help us to know "why testing is fun, why it has to be brain intensive and why it is equally rewarding".

To help you with some code, this is how addition looks like and you got to test + (which is in red font)

int a = 10, b = 255, c;
c = a + b;

How will you proceed?