Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Best practices
"Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message
news:3D23508E.387D3F7C_at_exesolutions.com...
> The code:
>
> IF acct_type = 'A' THEN
> commission_pct := X;
> ELSIF acct_type = 'B' THEN
> commission_pct := Y;
> ELSIF acct_type = 'C' THEN
> commission_pct := Z;
> END IF;
>
> If you can see what is wrong, and it is pretty obvious, great. But it
managed to
> stay in their system for almost a year.
>
> What is important is to recognize is that error is so subtle that no QA
technique
> known, other than a code review, could possibly catch it.
Assuming the error is that acct_type isn't constrained to be one of A.B,C then QA can test this by putting invalid values into the test data. When I get a new version of a timesheet system I will always try putting more than 24 hours a day into the system (and fewer than zero) to see what happens. I'll try to record time to projects with codes like &%'065 etc.
Actually there is another classic bug related to time measurement that I'm aware of.
You have an array of 48 elements into which you record measurements taken every half hour. At the end of the day the array is emptied into a datastore or whatever. When does this system fall over.
-- Niall Litchfield Oracle DBA Audit Commission UK ***************************************** Please include version and platform and SQL where applicable It makes life easier and increases the likelihood of a good answer ******************************************Received on Thu Jul 04 2002 - 03:37:27 CDT
>
> If you can't catch it then ask and I'll add it to the thread. (and if I
made some
> silly syntax error ... that's not it).
>
> Daniel Morgan
>
![]() |
![]() |