1 PACKAGE BODY INV_DIAG_GRP_MSN AS
2 /* $Header: INVDGSNB.pls 120.0.12000000.1 2007/06/22 00:48:00 musinha noship $ */
3 ------------------------------------------------------------
4 -- procedure to report test name back to framework
5 ------------------------------------------------------------
6 PROCEDURE getTestName(str OUT NOCOPY VARCHAR2) IS
7 BEGIN
8 str := 'Serial Number Information';
9 END getTestName;
10
11 ------------------------------------------------------------
12 -- procedure to report name back to framework
13 ------------------------------------------------------------
14 PROCEDURE getComponentName(str OUT NOCOPY VARCHAR2) IS
15 BEGIN
16 str := 'Serial Number Information';
17 END getComponentName;
18
19 ------------------------------------------------------------
20 -- procedure to report test description back to framework
21 ------------------------------------------------------------
22 PROCEDURE getTestDesc(str OUT NOCOPY VARCHAR2) IS
23 BEGIN
24 str := 'Serial Number Information';
25 END getTestDesc;
26
27
28 PROCEDURE getDependencies (package_names OUT NOCOPY JTF_DIAG_DEPENDTBL) IS
29 tempDependencies JTF_DIAG_DEPENDTBL;
30 BEGIN
31 tempDependencies := JTF_DIAGNOSTIC_ADAPTUTIL.initDependencyTable;
32 tempDependencies := JTF_DIAGNOSTIC_ADAPTUTIL.addDependency(tempDependencies,'INV_DIAG_MSN');
33 tempDependencies := JTF_DIAGNOSTIC_ADAPTUTIL.addDependency(tempDependencies,'INV_DIAG_MUT');
34 package_names := tempDependencies;
35 EXCEPTION
36 when others then
37 package_names := JTF_DIAGNOSTIC_ADAPTUTIL.initDependencyTable;
38 END getDependencies;
39
40 PROCEDURE isDependencyPipelined(str OUT NOCOPY VARCHAR2) IS
41 BEGIN
42 str := 'TRUE';
43 END isDependencyPipelined;
44
45
46 PROCEDURE getOutputValues(outputValues OUT NOCOPY JTF_DIAG_OUTPUTTBL) IS
47 BEGIN
48 outputValues := JTF_DIAGNOSTIC_ADAPTUTIL.initOutputTable;
49 END getOutputValues;
50
51 ------------------------------------------------------------
52 -- procedure to provide/populate the default parameters for the test case.
53 ------------------------------------------------------------
54 PROCEDURE getDefaultTestParams(defaultInputValues OUT NOCOPY JTF_DIAG_INPUTTBL) IS
55 tempInput JTF_DIAG_INPUTTBL;
56 BEGIN
57 tempInput := JTF_DIAGNOSTIC_ADAPTUTIL.initinputtable;
58 tempInput := JTF_DIAGNOSTIC_ADAPTUTIL.addInput(tempInput,'OrgId','LOV-oracle.apps.inv.diag.lov.OrganizationLov');
59 tempInput := JTF_DIAGNOSTIC_ADAPTUTIL.addInput(tempInput,'ItemId','LOV-oracle.apps.inv.diag.lov.ItemLov');
60 tempInput := JTF_DIAGNOSTIC_ADAPTUTIL.addInput(tempInput,'SerialNum','LOV-oracle.apps.inv.diag.lov.SerialLov');
61 defaultInputValues := tempInput;
62 -- EXCEPTION
63 -- when others then
64 --defaultInputValues := JTF_DIAGNOSTIC_ADAPTUTIL.initinputtable;
65 END getDefaultTestParams;
66
67 ------------------------------------------------------------
68 -- procedure to report test mode back to the framework
69 ------------------------------------------------------------
70 FUNCTION getTestMode RETURN NUMBER IS
71 BEGIN
72 --return(2);
73 return JTF_DIAGNOSTIC_ADAPTUTIL.ADVANCED_MODE;
74 END getTestMode;
75
76
77 ------------------------------------------------------------
78 -- procedure to initialize test datastructures
79 -- executes prior to test run
80 ------------------------------------------------------------
81 PROCEDURE init IS
82 BEGIN
83 -- test writer could insert special setup code here
84 -- fnd_file.put_line(fnd_file.log,'@@@ in pipe init : '||to_char(SYSDATE, 'DD-MON-YYYY HH24:MI:SS'));
85 null;
86 END init;
87
88 ------------------------------------------------------------
89 -- procedure to cleanup any test datastructures that were setup in the init
90 -- procedure call executes after test run
91 ------------------------------------------------------------
92 PROCEDURE cleanup IS
93 BEGIN
94 -- test writer could insert special cleanup code here
95 fnd_file.put_line(fnd_file.log,'@@@ in pipe cleanup : '||to_char(SYSDATE, 'DD-MON-YYYY HH24:MI:SS'));
96 END cleanup;
97
98 ------------------------------------------------------------
99 -- procedure to execute the PLSQL test
100 -- the inputs needed for the test are passed in and a report object and CLOB are -- returned.
101 ------------------------------------------------------------
102 PROCEDURE runtest(inputs IN JTF_DIAG_INPUTTBL,
103 report OUT NOCOPY JTF_DIAG_REPORT,
104 reportClob OUT NOCOPY CLOB) IS
105 reportStr LONG; -- REPORT
106 sql_text VARCHAR2(200); -- SQL select statement
107 c_username VARCHAR2(50); -- accept input for username
108 statusStr VARCHAR2(50); -- SUCCESS or FAILURE
109 errStr VARCHAR2(4000); -- error message
110 fixInfo VARCHAR2(4000); -- fix tip
111 isFatal VARCHAR2(50); -- TRUE or FALSE
112 num_rows NUMBER;
113 l_sn VARCHAR2(30);
114 l_org_id number;
115 BEGIN
116 JTF_DIAGNOSTIC_ADAPTUTIL.setUpVars; -- must have
117
118 -- html formatting
119 JTF_DIAGNOSTIC_ADAPTUTIL.addStringToReport('@html');
120 JTF_DIAGNOSTIC_COREAPI.Show_Header(null, null); -- add html css
121 fnd_file.put_line(fnd_file.log,'@@@ grpmsn 1');
122 INV_DIAG_GRP.g_grp_name :='INV_DIAG_GRP_MSN';
123 -- for dummy testing, simply put status as 'SUCCESS'
124 -- successful test will not show error message and fix info in report
125 statusStr := ''; -- 'SUCCESS';
126 errStr := ''; --Test failure message displayed here';
127 fixInfo := ''; -- 'Fixing the test suggestions here';
128 isFatal := ''; -- 'FALSE';
129
130 -- construct report
131 report := JTF_DIAGNOSTIC_ADAPTUTIL.constructReport(statusStr,errStr,fixInfo,isFatal);
132 reportClob := JTF_DIAGNOSTIC_ADAPTUTIL.getReportClob;
133 fnd_file.put_line(fnd_file.log,'@@@ grpmsn 2');
134 END runTest;
135
136 END;