Oracle Fusion Middleware extensions for Logging and Diagnostic
11g Release 1 (11.1.1.6)

E22565-06

oracle.apps.fnd.appltest.diagfwk.api
Class AbstractDiagTest

java.lang.Object
  extended by oracle.apps.fnd.appltest.diagfwk.api.AbstractDiagTest
All Implemented Interfaces:
DiagTest
Direct Known Subclasses:
QA_JavaAPI_TestSuite.DTestGenericStep, SampleAppGeneralSetupTest, SampleCheckSetupGL, SampleCurrentUserInfoTest, SampleGLJournalDataCollector, SampleProfileTest, SampleTables, SampleTest, SampleTestAnn, SampleTestApplicationAM, SampleTestMsgSvc, SampleTestParameters, SampleTestReportFormat, SampleTestStep, SampleTestStepDiagErrorOrWarning, SampleTestStepSleep, SampleTestSysPropChecker, SampleTestWithExecError, SampleTestWithLinks, SampleTestWithLOVAndValidator, UTestAbstractDiagTest.ATest, UTestAnnotationConverter.SampleTest, UTestAnnotationConverterExceptions.InputParam_displayNameEx, UTestAnnotationConverterExceptions.InputParam_nameEx, UTestAnnotationConverterExceptions.OutputParam_displayNameEx, UTestAnnotationConverterExceptions.OutputParam_nameEx, UTestAnnotationConverterExceptions.Prereqs_valueEx, UTestAnnotationConverterExceptions.Tag_nameEx, UTestAnnotationConverterExceptions.Tag_valueEx, UTestAnnotationConverterExceptions.TargetJavaClasses_valueEx, UTestAnnotationConverterExceptions.TargetPLSQLPkg_nameEx, UTestAnnotationConverterExceptions.TargetPLSQLPkg_typeEx, UTestAnnotationConverterExceptions.TaxonomyTags_badModuleKeyEx, UTestAnnotationConverterExceptions.TaxonomyTags_moduleIDEx, UTestAnnotationConverterExceptions.TaxonomyTags_moduleKeyEx, UTestAnnotationConverterExceptions.TestDef_descriptionEx, UTestAnnotationConverterExceptions.TestDef_displayNameEx, UTestAnnotationConverterExceptions.TestDef_missingEx, UTestDiagCmdGetTestRun.DTestNoNLSKey, UTestDiagCmdRunTests.DTestGenericStep, UTestDiagnosticsTestFramework.DTestGenericStep, UTestDiagPLSQLStepTests.SimpleJavaPiperTest, UTestOADBTestDefDAOFetchPrereqs.DTestGenericStep, UTestRegisterVerb.SampleTest_UTestRegisterVerb_NoDep, UTestRegisterVerb.SampleTest_UTestRegisterVerb_NoDep_W_Usage, UTestReportURLProvider.DTestGenericStep, UTestReportVerb.TestStepLinks, UTestReportVerb.TestStepNLS, UTestStatusVerb.TestStepExecErr, UTestTestDefFacade.DTestWriteInputValuesToFileStep, UTestTestDefImplRunSingle.DTestBaseDiagTest, UTestTestDefImplRunSingle.DTestMultiJavaStepsNoParams_Step2, UTestTestDefImplRunSingle.DTestMultiJavaStepsWithParams_Step2

public abstract class AbstractDiagTest
extends java.lang.Object
implements DiagTest

Provides an abstract base class for all diagnostic tests. All clients writing Java test classes should extend from this class. The clients would need to implement the following abstract APIs:

This base class stores the execution context for the test and additionally provides convenience APIs for getting input parameters and setting output parameters.


Constructor Summary
AbstractDiagTest()
           
 
Method Summary
protected  void addOutputParam(java.lang.String pParamName, java.lang.Boolean pParamVal)
          Adds an output parameter to the context that is of Boolean type
protected  void addOutputParam(java.lang.String pParamName, java.util.Date pParamVal)
          Adds an output parameter to the context that is of Date type
protected  void addOutputParam(java.lang.String pParamName, java.lang.Double pParamVal)
          Adds an output parameter to the context that is of Double type
protected  void addOutputParam(java.lang.String pParamName, java.lang.Float pParamVal)
          Adds an output parameter to the context that is of Float type
protected  void addOutputParam(java.lang.String pParamName, java.lang.Integer pParamVal)
          Adds an output parameter to the context that is of Integer type
protected  void addOutputParam(java.lang.String pParamName, java.lang.Long pParamVal)
          Adds an output parameter to the context that is of Long type
protected  void addOutputParam(java.lang.String pParamName, java.lang.String pParamVal)
          Adds an output parameter to the context that is of String type
protected abstract  void cleanup()
          Performs any cleanup required.
protected  oracle.jbo.ApplicationModule createApplicationModule(java.lang.String appModName, java.lang.String configName)
          creates an application module by the given appModule name and connects to the am by global datasource, "jdbc/ApplicationDBDS"
protected  oracle.jbo.ApplicationModule createApplicationModule(java.lang.String appModName, java.lang.String configName, java.lang.String ds)
          creates an application module by the given appModule name, configuration name and connect to the am by the given datasource string
protected  java.lang.Boolean getBooleanInputParam(java.lang.String pParamName)
          Gets the value for an input parameter that is of Boolean type.
protected  java.lang.ClassLoader getBundleClassLoader()
          return a ClassLoader for accessing resource bundles located in diagfwk.diagnostic.test.location.
protected  DiagContext getContext()
          Returns the current execution context.
protected  java.util.Date getDateInputParam(java.lang.String pParamName)
          Gets the value for an input parameter that is of Date type.
protected  java.lang.Double getDoubleInputParam(java.lang.String pParamName)
          Gets the value for an input parameter that is of Double type.
protected  java.lang.Float getFloatInputParam(java.lang.String pParamName)
          Gets the value for an input parameter that is of Float type.
protected  java.lang.Integer getIntegerInputParam(java.lang.String pParamName)
          Gets the value for an input parameter that is of Integer type.
protected  java.lang.Long getLongInputParam(java.lang.String pParamName)
          Gets the value for an input parameter that is of Long type.
protected  java.lang.String getStringInputParam(java.lang.String pParamName)
          Gets the value for an input parameter that is of String type
protected abstract  void init()
          Performs any initialization activities prior to executing the test logic.
protected  void releaseApplicationModule(oracle.jbo.ApplicationModule am)
          Releases an application module.
protected abstract  void runTest()
          Performs the execution logic for the test.
 void runTest(DiagContext pContext)
          Executes the logic for the diagnostic test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDiagTest

public AbstractDiagTest()
Method Detail

runTest

public void runTest(DiagContext pContext)
Executes the logic for the diagnostic test.

This API calls the following APIs in the given order:

Specified by:
runTest in interface DiagTest
Parameters:
pContext - the current execution context.

createApplicationModule

protected oracle.jbo.ApplicationModule createApplicationModule(java.lang.String appModName,
                                                               java.lang.String configName)
creates an application module by the given appModule name and connects to the am by global datasource, "jdbc/ApplicationDBDS"

Parameters:
appModName - the name of the application module to be created
configName - the name of the configuration

createApplicationModule

protected oracle.jbo.ApplicationModule createApplicationModule(java.lang.String appModName,
                                                               java.lang.String configName,
                                                               java.lang.String ds)
creates an application module by the given appModule name, configuration name and connect to the am by the given datasource string

Parameters:
appModName - the name of the application module to be created
configName - the name of the configuration
ds - the name of the datasource to connect

releaseApplicationModule

protected void releaseApplicationModule(oracle.jbo.ApplicationModule am)
Releases an application module.

Parameters:
am - the application module to be released

getContext

protected DiagContext getContext()
Returns the current execution context.

Returns:
the current execution context.

getStringInputParam

protected java.lang.String getStringInputParam(java.lang.String pParamName)
Gets the value for an input parameter that is of String type

Returns:
the value for an input parameter that is of String type

getIntegerInputParam

protected java.lang.Integer getIntegerInputParam(java.lang.String pParamName)
Gets the value for an input parameter that is of Integer type.

Returns:
the value for an input parameter that is of Integer type.

getBooleanInputParam

protected java.lang.Boolean getBooleanInputParam(java.lang.String pParamName)
Gets the value for an input parameter that is of Boolean type.

Returns:
the value for an input parameter that is of Boolean type.

getFloatInputParam

protected java.lang.Float getFloatInputParam(java.lang.String pParamName)
Gets the value for an input parameter that is of Float type.

Returns:
the value for an input parameter.

getDoubleInputParam

protected java.lang.Double getDoubleInputParam(java.lang.String pParamName)
Gets the value for an input parameter that is of Double type.

Returns:
the value for an input parameter.

getLongInputParam

protected java.lang.Long getLongInputParam(java.lang.String pParamName)
Gets the value for an input parameter that is of Long type.

Returns:
the value for an input parameter.

getDateInputParam

protected java.util.Date getDateInputParam(java.lang.String pParamName)
Gets the value for an input parameter that is of Date type.

Returns:
the value for an input parameter.

addOutputParam

protected void addOutputParam(java.lang.String pParamName,
                              java.lang.String pParamVal)
Adds an output parameter to the context that is of String type

Parameters:
pParamName - - name of the output parameter
pParamVal - - value for the output parameter

addOutputParam

protected void addOutputParam(java.lang.String pParamName,
                              java.lang.Integer pParamVal)
Adds an output parameter to the context that is of Integer type

Parameters:
pParamName - - name of the output parameter
pParamVal - - value for the output parameter

addOutputParam

protected void addOutputParam(java.lang.String pParamName,
                              java.lang.Boolean pParamVal)
Adds an output parameter to the context that is of Boolean type

Parameters:
pParamName - - name of the output parameter
pParamVal - - value for the output parameter

addOutputParam

protected void addOutputParam(java.lang.String pParamName,
                              java.lang.Float pParamVal)
Adds an output parameter to the context that is of Float type

Parameters:
pParamName - - name of the output parameter
pParamVal - - value for the output parameter

addOutputParam

protected void addOutputParam(java.lang.String pParamName,
                              java.lang.Double pParamVal)
Adds an output parameter to the context that is of Double type

Parameters:
pParamName - - name of the output parameter
pParamVal - - value for the output parameter

addOutputParam

protected void addOutputParam(java.lang.String pParamName,
                              java.lang.Long pParamVal)
Adds an output parameter to the context that is of Long type

Parameters:
pParamName - - name of the output parameter
pParamVal - - value for the output parameter

addOutputParam

protected void addOutputParam(java.lang.String pParamName,
                              java.util.Date pParamVal)
Adds an output parameter to the context that is of Date type

Parameters:
pParamName - - name of the output parameter
pParamVal - - value for the output parameter

getBundleClassLoader

protected java.lang.ClassLoader getBundleClassLoader()
return a ClassLoader for accessing resource bundles located in diagfwk.diagnostic.test.location. The ClassLoader should be used for BundleFactory when getBundle() is called.

Returns:
a classLoader for resource bundles

init

protected abstract void init()
Performs any initialization activities prior to executing the test logic. Such activities may include collecting values for all input parameters for the test, validating them etc.


runTest

protected abstract void runTest()
Performs the execution logic for the test. In addition to executing the test, this method will also update the StepReport (and optionally the TestReport) available from the DiagContext with the results collected. Finally, the method will also update the context with the result of the test.


cleanup

protected abstract void cleanup()
Performs any cleanup required. This method will get invoked after the runTest() method in a finally block to ensure that the cleanup activities occur even if runTest() failed.


Oracle Fusion Middleware extensions for Logging and Diagnostic
11g Release 1 (11.1.1.6)

E22565-06

Copyright © 2012 Oracle. All Rights Reserved.