Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: I need help about TESTING script

Re: I need help about TESTING script

From: Ed Prochak <edprochak_at_gmail.com>
Date: Tue, 28 Aug 2007 16:55:53 -0000
Message-ID: <1188320153.531163.261810@y42g2000hsy.googlegroups.com>


On Aug 27, 3:54 pm, wajim <waji..._at_hotmail.com> wrote:
> Hi all, does somebody have an idea about TESTING this script?.....
>
> This is my script (for data migation) :
>
> --PH1_LOAD.sql
>
> create or replace view myview2 as
> select substr(cl.old_system_id,instr(cl.old_system_id,':')+1,4) as
> order_id,
> substr(cl.old_system_id,instr(cl.old_system_id,':')+6)
> as item_id,
> c.customer_id as customer_id,
> p.product_id as product_id,
> ROUND(price.list_price-
> (price.list_price*price.discount_available)/
> 100,2) as actual_price,
> cl.quantity as quantity,
> ROUND(price.list_price-
> (price.list_price*price.discount_available)/
> 100*cl.quantity,2) as total,
> cl.order_date as order_date,
> cl.ship_date as ship_date,
> cl.old_system_id as old_sys_ref
> from PH1_CA_LOAD cl,
> PH1_SITE_MAP_LOAD sml,
> PH1_CA_PROD_CONV_LOAD prod,
> PH1_CA_PRICE_DATA_LOAD price,
> customer c,
> product p
> where substr(cl.old_system_id,1,instr(cl.old_system_id,':')-1) =
> sml.site_code
> and c.name = sml.billing_customer
> and prod.description = p.description
> and cl.old_description = prod.old_code
> and prod.old_code = price.ca_product_code
> /
>
> prompt Insert all items in PH1_ITEM
> insert all into
> PH1_ITEM(order_id,item_id,customer_id,product_id,actual_price,quantity,tota­­
> l,order_date,ship_date,old_sys_ref)
> values(order_id,item_id,customer_id,product_id,actual_price,quantity,total,­­
> order_date,ship_date,old_sys_ref)
> select * from myview1
> /
>
> insert all into
> PH1_ITEM(order_id,item_id,customer_id,product_id,actual_price,quantity,tota­­
> l,order_date,ship_date,old_sys_ref)
> values(order_id,item_id,customer_id,product_id,actual_price,quantity,total,­­
> order_date,ship_date,old_sys_ref)
> select * from myview2
> /
>
> *My question is : what example of TEST PROCEDURE can I make BEFORE
> AND
> AFTER PH1_LOAD script?
> and I should update results in TEST TABLE SUITE like this:
> (test_id NUMBER(8),
> phase_number NUMBER(2),
> task_number NUMBER(2,1),
> solution_number NUMBER(1),
> test_name VARCHAR2(50),
> test_desc VARCHAR2(200),
> before_total NUMBER(8),
> after_total NUMBER(8),
> result VARCHAR2(4) )
>
> Thanks a lot....

The key to testing any program is to have a good idea of why the program is supposed to do.
1. take some sample data and convert it manually to get expected results.

2. code your program
3. execute your program in a test environment.
4. did the program produce the results you expected?
  YES, you are done
  NO, then the differences should suggest what part of the program failed. Fix it and goto step 3.

HTH,
  ed Received on Tue Aug 28 2007 - 11:55:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US