总调脚本:
CREATE OR REPLACE PACKAGE BODY PKG_KPI_TC IS
PROCEDURE SCHEDULER(
/*********************************************************************
*parameter:
*authoer XIANGMIN.MENGXM
*time 2009-6-26
*
*********************************************************************/
P_DATE IN DATE DEFAULT TRUNC(SYSDATE))
IS
V_DATE DATE := TRUNC(P_DATE);
BEGIN
DELETE FROM test_map WHERE yyyymmdd = v_date;
COMMIT;--调度之前先清空测试表
REF_KPI_TC_001(v_date);--用例1
REF_KPI_TC_002(v_date);--用例2
END;
END PKG_KPI_TC;
测试用例1 CREATE OR REPLACE PROCEDURE REF_KPI_TC_001(P_DATE IN DATE DEFAULT TRUNC(SYSDATE)) IS
V_id NUMBER;
V_DATE DATE := TRUNC(P_DATE);
BEGIN
SELECT a.id into v_id FROM src_a; INSERT INTO test_map(YYYYMMDD,id,x) VALUES(v_date,v_id,x);
COMMIT;
END;