Dawa,
>Howerver, I can imagine that a piece of code not getting excuted during the test because the condition that causes this piece of code to be excuted is not met.
You might want to look at the Coverage Profiler to help you check how adequately your test code covers all the execution paths in the code.
> If there is an error in the code, it will be the users who catch the bug. Therefore, a good test plan does seem to be important.
Check the Wiki for some good ideas on runtime error handling as well. Read Doug Hennig's error handler paper too, I'm pretty sure it is linked in one of the Wiki articles.