DBA Data[Home] [Help]

PACKAGE BODY: APPS.BIS_DIAG_SETUP_PROFILE_TEST

Source


1 PACKAGE BODY BIS_DIAG_SETUP_PROFILE_TEST AS
2 /* $Header: BISPDPRB.pls 120.0.12000000.2 2007/08/10 06:02:53 nbarik noship $ */
3 --
4 /*
5 REM +=======================================================================+
6 REM |    Copyright (c) 2007 Oracle Corporation, Redwood Shores, CA, USA     |
7 REM |                         All rights reserved.                          |
8 REM +=======================================================================+
9 REM | FILENAME                                                              |
10 REM |     BISPDPRB.pls                                                      |
11 REM |                                                                       |
12 REM | DESCRIPTION                                                           |
13 REM |     Diagnostics Setup Profile Test Package Body                       |
14 REM |                                                                       |
15 REM | NOTES                                                                 |
16 REM |                                                                       |
17 REM | HISTORY                                                               |
18 REM | Date              Developer           Comments                        |
19 REM | 02-AUG-2007       nbarik              Creation                        |
20 REM |                                                                       |
21 REM +=======================================================================+
22 */
23 
24 ------------------------------------------------------------
25 -- procedure to initialize test datastructures
26 -- executed prior to test run - leave body as null otherwise
27 ------------------------------------------------------------
28 PROCEDURE init IS
29 BEGIN
30 -- test writer could insert special setup code here
31   NULL;
32 END init;
33 ------------------------------------------------------------
34 -- procedure to cleanup any test datastructures that were setup in the init
35 -- procedure call executes after test run - leave body as null otherwize
36 ------------------------------------------------------------
37 PROCEDURE cleanup IS
38 BEGIN
39 -- test writer could insert special cleanup code here
40   NULL;
41 END cleanup;
42 ------------------------------------------------------------
43 -- procedure to execute the PLSQL test
44 -- the inputs needed for the test are passed in and a report object and CLOB are
45 -- returned.
46 -- note the way that support API writes to the report CLOB.
47 ------------------------------------------------------------
48 PROCEDURE runtest(inputs IN JTF_DIAG_INPUTTBL,
49 	report OUT NOCOPY JTF_DIAG_REPORT,
50 	reportClob OUT NOCOPY CLOB)
51 IS
52   reportStr LONG;
53   counter NUMBER;
54   dummy_v2t JTF_DIAGNOSTIC_COREAPI.v2t;
55   c_userid VARCHAR2(50);
56   statusStr VARCHAR2(50);
57   errStr VARCHAR2(4000);
58   fixInfo VARCHAR2(4000);
59   isFatal VARCHAR2(50);
60   dummy_num NUMBER;
61   sqltxt VARCHAR2 (2000);
62 BEGIN
63   JTF_DIAGNOSTIC_ADAPTUTIL.setUpVars;
64   JTF_DIAGNOSTIC_ADAPTUTIL.addStringToReport('@html');
65   JTF_DIAGNOSTIC_COREAPI.insert_style_sheet;
66   -- JTF_DIAGNOSTIC_COREAPI.line_out('this also writes to the clob');
67   JTF_DIAGNOSTIC_ADAPTUTIL.addStringToReport(reportClob,reportStr);
68   -- JTF_DIAGNOSTIC_ADAPTUTIL.addStringToReport('String into report');
69   JTF_DIAGNOSTIC_COREAPI.Display_Profiles(191, null);
70   JTF_DIAGNOSTIC_COREAPI.BRPrint;
71   JTF_DIAGNOSTIC_COREAPI.ActionPrint(fnd_message.get_string('BIS', 'BIS_DIAG_TESTCASE_FIX_INFO'));
72   statusStr := 'SUCCESS';
73   -- JTF_DIAGNOSTIC_COREAPI.ActionErrorPrint('You better do something!');
74   errStr := '';
75   fixInfo := '';
76   isFatal := 'FALSE';
77   report := JTF_DIAGNOSTIC_ADAPTUTIL.constructReport(statusStr,errStr,fixInfo,isFatal);
78   reportClob := JTF_DIAGNOSTIC_ADAPTUTIL.getReportClob;
79 END runTest;
80 ------------------------------------------------------------
81 -- procedure to report name back to framework
82 ------------------------------------------------------------
83 PROCEDURE getComponentName(name OUT NOCOPY VARCHAR2) IS
84 BEGIN
85   name := fnd_message.get_string('BIS', 'BIS_DIAG_PROFILES');
86 END getComponentName;
87 ------------------------------------------------------------
88 -- procedure to report test description back to framework
89 ------------------------------------------------------------
90 PROCEDURE getTestDesc(descStr OUT NOCOPY VARCHAR2) IS
91 BEGIN
92   descStr := fnd_message.get_string('BIS', 'BIS_DIAG_PROFILES_DESC');
93 END getTestDesc;
94 ------------------------------------------------------------
95 -- procedure to report test name back to framework
96 ------------------------------------------------------------
97 PROCEDURE getTestName(name OUT NOCOPY VARCHAR2) IS
98 BEGIN
99   name := fnd_message.get_string('BIS', 'BIS_DIAG_PROFILES_TEST');
100 END getTestName;
101 ------------------------------------------------------------
102 -- procedure to provide the default parameters for the test case.
103 -- please note the paramters have to be registered through the UI
104 -- before basic tests can be run.
105 --
106 ------------------------------------------------------------
107 PROCEDURE getDefaultTestParams(defaultInputValues OUT NOCOPY JTF_DIAG_INPUTTBL)
108 IS
109   tempInput JTF_DIAG_INPUTTBL;
110 BEGIN
111   tempInput := JTF_DIAGNOSTIC_ADAPTUTIL.initinputtable;
112   -- tempInput := JTF_DIAGNOSTIC_ADAPTUTIL.addInput(tempInput,'USERID','SYSADMIN');
113   -- tempInput := JTF_DIAGNOSTIC_defaultInputValues := tempInput;
114 EXCEPTION
115   when others then
116     defaultInputValues := JTF_DIAGNOSTIC_ADAPTUTIL.initinputtable;
117 END getDefaultTestParams;
118 
119 END BIS_DIAG_SETUP_PROFILE_TEST;