Friday, November 20, 2009

Using objectives to test logic errors

Objectives, goals and purposes are useful to test our code, but only if there are no logic errors.

For example, you have an idea and you want to test it out, but you are afraid of using the real context of your idea and spoil or confuse everything, so you try to test in another narrower context... No! Forget about it. You could end losing twice the time.

Although you try to change to another kind of test, your probability of commiting a logic error is the same, so, don't waste time doing collateral tests. Use the main logic of your application, and build your test upon it.

If you want to do a test aside from your main application, do it inside a class or a function, to make it easy to adapt.

No comments:

Post a Comment