Oracle Fusion Middleware extensions for Logging and Diagnostics
11g Release 1 (11.1.2)

E22565-02

oracle.apps.fnd.appltest.diagfwk.engine
Interface TestDef

All Superinterfaces:
DiagBObj<TestDef>, DiagConstants
All Known Implementing Classes:
TestDefImpl

public interface TestDef
extends DiagBObj<TestDef>

Models the test definition business object.

This interface encapsulates all the operations for a single test definition.


Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.appltest.diagfwk.common.DiagConstants
DiagConstants.ExecutionMode, DiagConstants.Format, DiagConstants.LinkType, DiagConstants.Status
 
Field Summary
 
Fields inherited from interface oracle.apps.fnd.appltest.diagfwk.common.DiagConstants
APPS_MSG_ID_TAG_NAME, CFG_ADR_PROVIDER_CLASS, CFG_CACHE_PROVIDER_CLASS, CFG_CRED_PROVIDER_CLASS, CFG_DAO_FACTORY_CLASS, CFG_DB_CONN_INFO_PROVIDER_CLASS, CFG_DB_CONN_PROVIDER_CLASS, CFG_NLS_PROVIDER_CLASS, CFG_PLSQL_PROVIDER_CLASS, CFG_PROFILE_PROVIDER_CLASS, CFG_SECURITY_PROVIDER_CLASS, CFG_SESSION_INFO_PROVIDER_CLASS, CFG_URL_PROVIDER_FACTORY_CLASS, CFG_WLS_MBEANSRV_CONNINFO_PROVIDER_CLASS, DATA_SECURITY_PERMISSION_ALLOWED, DATA_SECURITY_PERMISSION_NOT_ALLOWED, DELIM_URL, EXEC_MODE_CLI, EXEC_MODE_ESS, EXEC_MODE_INCIDENT, EXEC_MODE_JAVA, EXEC_MODE_UI, EXECUTABLE_TYPE_JAVA, EXECUTABLE_TYPE_PLSQL, EXECUTABLE_TYPE_TESTREF, FORMAT_HTML, FORMAT_XML, GUID_ORACLE_MINUS1, GUID_ORACLE_ZERO, INPUTS_STATUS_ALL_OPT_INPUTS, INPUTS_STATUS_NO_INPUTS, INPUTS_STATUS_REQ_INPUTS_NO_DEFAULTS, INPUTS_STATUS_REQ_INPUTS_W_DEFAULTS, IO_FLAG_I, IO_FLAG_O, JMX_API_BASE_OBJECT_NAME, LINK_EXTERNAL, LINK_INTERNAL, LINK_METALINK, N, NLS_BUNDLE_JAVA_RES, NLS_BUNDLE_MSG_SVC, NLS_BUNDLE_RES_REF, NLS_BUNDLE_XLIFF, NO, NULL, ODF_MBEAN_DOMAIN_NAME, PARAM_MON_INTERVAL, PLSQL_DEBUG_ENABLED_SYSTEM_PROP, PREREQ_TYPE_TAG_VALUE, PREREQ_TYPE_TEST, SECONDS_IN_ONE_DAY, SECONDS_IN_ONE_HOUR, STATUS_CANCELED, STATUS_EXECERROR, STATUS_FAILURE, STATUS_RUNNING, STATUS_SUCCESS, STATUS_WARNING, SYS_PROP_MAX_MONITOR_INTERNVAL, SYS_PROP_MAX_NUM_THREADS, SYSPROP_APPCONNFILE, SYSPROP_DIAG_CONFIG_FILE, TAG_TYPE_DIAG, TAG_TYPE_TAXONOMY, TEST_TYPE_DECL, TEST_TYPE_JAVA, USER_NAME, WEB_APP_NAME_TAG_NAME, Y, YES
 
Method Summary
 TestTreeNode asTestTreeNode()
          Returns this test definition object as a TestTreeNode instance
 void copy(TestDef pObj)
          Copies the contents of the given object into this object
 void copyAndPopulate(TestDef pObj)
          Copies the contents of the given object into this object After copying the TestDef attribtues, the JAXB Tree is populated based on the test metadata.
 boolean delete()
          deletes the test and it's associated data from the db deletes parms, inputsets unlinks the tag values, and prereqs from this test
 void fetch()
          Fetches the test definition from the repository for this test.
 java.util.List<TestParam> fetchActiveInputParams()
          Fetches the list of active input parameters for this test.
 java.util.List<TestParam> fetchActiveOutputParams()
          Fetches the list of active output parameters for this test.
 TestInputSetList fetchDefaultInputSetList()
          Fetches the list of default input sets for this test
 java.util.List<TestParam> fetchInputParams()
          Fetches the test input parameters metadata from this test.
 TestInputSetList fetchInputSetList()
          Fetches the list of input sets for this test.
 java.util.List<TestParam> fetchOutputParams()
          Fetches the test output parameters metadata from this test.
 void fetchSummary()
          Fetches the test definition summary information only from the repository for this test.
 java.util.List<java.lang.String> getAllPrereqTestIds()
          Returns the list of all the prerequisite Test IDs for this test.
 java.lang.String getDateFormat()
          Get the date format string that be used to encode date parameters
 java.lang.String getDescription()
          Returns the description
 java.lang.String getDisplayName()
          Returns the display name
 java.lang.Boolean getExecuteAllowed()
           
 java.lang.String getExtnName()
          Returns the extension name of this test from the test metadata
 TestParamList getInputParamList()
          Returns the list of input parameters for this test.
 TestInputSetList getInputSetList()
          Gets the input set list for this test
 java.lang.String getInputsStatus()
          Gets the inputs status code for this test.
 java.lang.String getModuleId()
          Returns the module ID for the taxonomy module that owns the seed data for this test.
 int getObjectVersionNumber()
          Returns the current object version number
 TestParamList getOutputParamList()
          Returns the list of output parameters for this test.
 TestPrereqList getPrereqs()
          Returns the list of prerequisite tests or tag values associated with this test.
 int getPrereqTestCount()
          Gets the prerequisite test count for this test.
 java.util.List<java.lang.String> getPrereqTestIdsForIncludes()
          Returns only the list of prerequisite Test IDs for any tests that are included in this test (via nested test reference steps).
 java.lang.String getRequiresApplicationCode()
          Returns the flag indicating whether the diagnostic test will need to access code from within the fusion application.
 java.lang.String getSensitivity()
          Gets the sensitivity for the test.
 TagValueList getTagValueList()
          Returns the list of tags values associated with this test.
 java.lang.String getTestId()
          Gets the Test ID
 java.lang.String getTestMetadata()
          Returns the test metadata XML.
 java.lang.String getTestName()
          Gets the Test Name
 java.lang.String getTestType()
          Gets the test type e.g.
 java.lang.String getUsage()
          Returns the usage
 java.lang.String getVersion()
          Returns the version of this test from the test metadata
 java.lang.Boolean getViewReportAllowed()
           
 boolean hasRequiredInputParams()
          This API checks to see if the test has any required input parameters declared in its metadata.
 void populate(java.lang.String pXMLMetadata)
          Populates this object based on the given Test Definition XML metadata String.
 void populateFromClass(java.lang.String pJavaClassName)
          Populates this object based on the given Test class file.
 void populateFromFile(java.lang.String pFilePath)
          Populates this object based on the given Test file.
 void populateTestAvailabilityInfo(TestAvailabilityInfo info)
          Checks the steps of this test, populates test availability information and recursively gathers availability information of nested tests.
 java.util.List<TestPrereq> queryActivePrereqTests(java.lang.String pTestName)
          Queries the list of active prerequisites for the given test
 java.util.List<TagValue> queryActiveTagValues(java.lang.String pTestName)
          Queries the list of active tag values for the given test
 void removeTagValueIdReference(java.lang.String pTagValueId, boolean pAssocOnly)
          Removes the reference to the given tag value ID from this test's definition metadata.
 TestExec run(DiagContextExtn pContext)
          Runs the diagnostic test for this test definition based on the information available in the context.
 void save()
          Saves the in-memory test definition in this object into the test repository.
 void saveErrorTestExec(TestRun run, NameValueList inputs, oracle.apps.fnd.appllcm.sdk.common.ResourceRef pErrMsg, java.lang.Throwable t)
          Saves a new TestExecution after logging the given exception in it.
 void setDescription(java.lang.String pDescription)
          Sets the description.
 void setDisplayName(java.lang.String pDisplayName)
          Sets the test display name.
 void setExecuteAllowed(java.lang.Boolean pExecuteAllowed)
           
 void setExtnName(java.lang.String pExtnName)
          Sets the ExtnName
 void setInputParamList(TestParamList p)
          Sets the input parameter list for this test definition.
 void setInputSetList(TestInputSetList inputSetList)
          Sets the input set list for this test.
 void setInputsStatus(java.lang.String inputsStatus)
          Sets the inputs status code for this test
 void setModuleId(java.lang.String pModuleId)
          Sets the module ID
 void setObjectVersionNumber(int pObjectVersionNumber)
          Sets the Object version number.
 void setOutputParamList(TestParamList p)
          Sets the output parameter list for this test definition.
 void setPrereqs(TestPrereqList l)
          Sets the test prerequisite list for this test definition.
 void setPrereqTestCount(int prereqTestCount)
          Sets the prerequisite test count for this test
 void setRequiresApplicationCode(java.lang.String pRequiresApplicationCode)
          Sets the requiresApplicationCode flag ("Y" or "N")
 void setSensitivity(java.lang.String pSensitivity)
          Sets the sensitvity.
 void setTagValueList(TagValueList l)
          Sets the tag value list for this test definition
 void setTestId(java.lang.String pTestId)
          Sets the test ID.
 void setTestMetadata(java.lang.String pTestMetadata)
          Sets the test metadata XML.
 void setTestName(java.lang.String pTestName)
          Sets the test name.
 void setTestType(java.lang.String pTestType)
          Sets the test type.
 void setUsage(java.lang.String pUsage)
          Sets the usage.
 void setViewReportAllowed(java.lang.Boolean pViewReportAllowed)
           
 void validateInputValues(NameValueList pParamList)
          Validates the given list of input values for this test against the test's input parameter metadata for data type consistency.
 void validatePreRun()
          Performs validations required prior to execution of tests.
 void validatePreSave()
          Performs all the validation that the save() API would have performed prior to saving the test definition to the repository.
 
Methods inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.DiagBObj
copyT, getCreatedBy, getCreationDate, getLastUpdateDate, getLastUpdatedBy, getLastUpdateLogin, isCreatedByOracle, setCreatedBy, setCreationDate, setLastUpdateDate, setLastUpdatedBy, setLastUpdateLogin
 

Method Detail

getTestId

java.lang.String getTestId()
Gets the Test ID

Returns:
the Test ID

getTestName

java.lang.String getTestName()
Gets the Test Name

Returns:
the logical name of the test

getTestType

java.lang.String getTestType()
Gets the test type e.g. 'J' for single-step Java test, 'P' for single-step PLSQL test, 'C' or compound test etc.

Returns:
the type of the test

getSensitivity

java.lang.String getSensitivity()
Gets the sensitivity for the test. Sensitivity values can be 'H' for high, 'M' for medium and 'L' for low.

Returns:
the sensitivity of the test.

getTestMetadata

java.lang.String getTestMetadata()
Returns the test metadata XML.

Returns:
the test metadata XML

getObjectVersionNumber

int getObjectVersionNumber()
Returns the current object version number

Returns:
the current object version number

getPrereqTestCount

int getPrereqTestCount()
Gets the prerequisite test count for this test. This is the count of the number of test prerequisites for this test. Only immediate prerequisite tests associated with the current test are considered.

0 - No Prerequisites directly associated with this test
n - Has one or more prerequisites defined (where n is a number greater than 0)

Returns:
the immediate prerequisite test count for this test.

getInputsStatus

java.lang.String getInputsStatus()
Gets the inputs status code for this test.

The status code describes the state of whether or not the current test has required inputs. Possible values are:

Returns:
the inputs status code for this test.

getDisplayName

java.lang.String getDisplayName()
Returns the display name

Returns:
the display name

getDescription

java.lang.String getDescription()
Returns the description

Returns:
the description

getUsage

java.lang.String getUsage()
Returns the usage

Returns:
the usage

getVersion

java.lang.String getVersion()
Returns the version of this test from the test metadata


getModuleId

java.lang.String getModuleId()
Returns the module ID for the taxonomy module that owns the seed data for this test.

Returns:
the modele ID for the taxonomy module that owns the seed data for this test.

getExtnName

java.lang.String getExtnName()
Returns the extension name of this test from the test metadata

Returns:
the extension name for this test.

getRequiresApplicationCode

java.lang.String getRequiresApplicationCode()
Returns the flag indicating whether the diagnostic test will need to access code from within the fusion application.

Returns:
the String value ("Y" or "N") indicating whether the diagnostic test will need to access code from within the fusion application.

setTestId

void setTestId(java.lang.String pTestId)
Sets the test ID.

Parameters:
pTestId - the test ID

setTestName

void setTestName(java.lang.String pTestName)
Sets the test name.

Parameters:
pTestName - the test name

setTestType

void setTestType(java.lang.String pTestType)
Sets the test type.

Parameters:
pTestType - the test type

setSensitivity

void setSensitivity(java.lang.String pSensitivity)
Sets the sensitvity.

Parameters:
pSensitivity - the sensitivity

setTestMetadata

void setTestMetadata(java.lang.String pTestMetadata)
Sets the test metadata XML.

Parameters:
pTestMetadata - the test metadata XML

setObjectVersionNumber

void setObjectVersionNumber(int pObjectVersionNumber)
Sets the Object version number.

Parameters:
pObjectVersionNumber - the object version number

setPrereqTestCount

void setPrereqTestCount(int prereqTestCount)
Sets the prerequisite test count for this test

Parameters:
prereqTestCount - the prerequisite test count for this test.

setInputsStatus

void setInputsStatus(java.lang.String inputsStatus)
Sets the inputs status code for this test

Parameters:
inputsStatus - the inputs status code for this test.

setDisplayName

void setDisplayName(java.lang.String pDisplayName)
Sets the test display name.

Parameters:
pDisplayName - the display name

setDescription

void setDescription(java.lang.String pDescription)
Sets the description.

Parameters:
pDescription - the description

setUsage

void setUsage(java.lang.String pUsage)
Sets the usage.

Parameters:
pUsage - the usage

setModuleId

void setModuleId(java.lang.String pModuleId)
Sets the module ID

Parameters:
pModuleId - the module ID

setExtnName

void setExtnName(java.lang.String pExtnName)
Sets the ExtnName

Parameters:
pExtnName - the extension name

setRequiresApplicationCode

void setRequiresApplicationCode(java.lang.String pRequiresApplicationCode)
Sets the requiresApplicationCode flag ("Y" or "N")

Parameters:
pRequiresApplicationCode - the flag

getExecuteAllowed

java.lang.Boolean getExecuteAllowed()
Returns:
whether execution of the test is allowed

setExecuteAllowed

void setExecuteAllowed(java.lang.Boolean pExecuteAllowed)
Parameters:
pExecuteAllowed - new value of whether execution is allowed

getViewReportAllowed

java.lang.Boolean getViewReportAllowed()
Returns:
whether viewing the report for a test's execution is allowed

setViewReportAllowed

void setViewReportAllowed(java.lang.Boolean pViewReportAllowed)
Parameters:
pViewReportAllowed - new value of whether a test's execution report can be viewed

getInputParamList

TestParamList getInputParamList()
Returns the list of input parameters for this test.

Returns:
the list of input parameters for this test

getOutputParamList

TestParamList getOutputParamList()
Returns the list of output parameters for this test.

Returns:
the list of output parameters for this test

getTagValueList

TagValueList getTagValueList()
Returns the list of tags values associated with this test.

Returns:
the list of tags values associated with this test

getPrereqs

TestPrereqList getPrereqs()
Returns the list of prerequisite tests or tag values associated with this test.

Returns:
the list of TestPrereq objects

setInputParamList

void setInputParamList(TestParamList p)
Sets the input parameter list for this test definition.

Parameters:
p - input parameter list for this test definition

setOutputParamList

void setOutputParamList(TestParamList p)
Sets the output parameter list for this test definition.

Parameters:
p - output parameter list for this test definition

setTagValueList

void setTagValueList(TagValueList l)
Sets the tag value list for this test definition

Parameters:
l - tag value list for this test definition

setPrereqs

void setPrereqs(TestPrereqList l)
Sets the test prerequisite list for this test definition.

Parameters:
l - test prerequisite list for this test definition

save

void save()
Saves the in-memory test definition in this object into the test repository. If a test with the same name as this test already exists in the repository, that test is updated with the attributes of this test. Otherwise a new test is inserted into the repository.


validatePreSave

void validatePreSave()
                     throws DiagfwkException
Performs all the validation that the save() API would have performed prior to saving the test definition to the repository.

Throws:
DiagfwkException - when any validation failure occurs.

populate

void populate(java.lang.String pXMLMetadata)
Populates this object based on the given Test Definition XML metadata String.

Parameters:
pXMLMetadata - Test Definition XML metadata

populateFromFile

void populateFromFile(java.lang.String pFilePath)
Populates this object based on the given Test file. The test file must be a XML test definition file.

Parameters:
pFilePath - file path for the test file containing the test metadata definition.

populateFromClass

void populateFromClass(java.lang.String pJavaClassName)
Populates this object based on the given Test class file. The Test class file must an annotated Java class file.

Parameters:
pJavaClassName - name of the Java test class.

fetch

void fetch()
Fetches the test definition from the repository for this test. Either the test ID or the test name should be set on this object prior to calling this method.


fetchSummary

void fetchSummary()
Fetches the test definition summary information only from the repository for this test. Either the test ID or the test name should be set on this object prior to calling this method.


fetchInputParams

java.util.List<TestParam> fetchInputParams()
Fetches the test input parameters metadata from this test. Either the test ID or the test name should be set on this object prior to calling this method.

Returns:
list of input parameters for this test.

fetchActiveInputParams

java.util.List<TestParam> fetchActiveInputParams()
Fetches the list of active input parameters for this test. Either the test ID or the test name should be set on this object prior to calling this method.

Returns:
list of active input parameters for this test

fetchOutputParams

java.util.List<TestParam> fetchOutputParams()
Fetches the test output parameters metadata from this test. Either the test ID or the test name should be set on this object prior to calling this method.

Returns:
list of output parameters for this test.

fetchActiveOutputParams

java.util.List<TestParam> fetchActiveOutputParams()
Fetches the list of active output parameters for this test. Either the test ID or the test name should be set on this object prior to calling this method.

Returns:
list of active output parameters for this test

hasRequiredInputParams

boolean hasRequiredInputParams()
This API checks to see if the test has any required input parameters declared in its metadata. This API will also perform a fetch in order to get the test summary if required.

Returns:
true if the test contains required input parameters. false otherwise.

copy

void copy(TestDef pObj)
Copies the contents of the given object into this object

Parameters:
pObj - the object to copy into this object.

copyAndPopulate

void copyAndPopulate(TestDef pObj)
Copies the contents of the given object into this object After copying the TestDef attribtues, the JAXB Tree is populated based on the test metadata.

Parameters:
pObj - object to copy into this object.

validatePreRun

void validatePreRun()
Performs validations required prior to execution of tests. Validations include making sure Java step definitions are loadable and also performing validations for nested test reference steps


run

TestExec run(DiagContextExtn pContext)
Runs the diagnostic test for this test definition based on the information available in the context. If input values are not available in the context, the default values for required parameters are used.

Status updates are made to the fnd_diag_execution in the test repository periodically using a monitor thread. Additionally, for any test reference steps in this test, new child test executions are spawned.

Parameters:
pContext - context for the test execution
Returns:
the current test's execution defails in the form of a TestExec object.

getAllPrereqTestIds

java.util.List<java.lang.String> getAllPrereqTestIds()
Returns the list of all the prerequisite Test IDs for this test. The list of prerequisite test IDs is a comprehensive list and includes prerequisites of any tests nested in this test as well.

Returns:
the list of all the prerequisite tests.

getPrereqTestIdsForIncludes

java.util.List<java.lang.String> getPrereqTestIdsForIncludes()
Returns only the list of prerequisite Test IDs for any tests that are included in this test (via nested test reference steps). If this test does not contain any included tests, the method returns an empty list.

Returns:
the list of prerequisite Test IDs for any tests that are included in this test (via nested test reference steps).

validateInputValues

void validateInputValues(NameValueList pParamList)
                         throws DiagfwkException
Validates the given list of input values for this test against the test's input parameter metadata for data type consistency. The definition for this test should have been fetched by calling the fetch() API prior to calling this method

Parameters:
pParamList - list of input parameter values to validate for this test.
Throws:
DiagfwkException - when an invalid value is encountered for a particular input parameter.

queryActivePrereqTests

java.util.List<TestPrereq> queryActivePrereqTests(java.lang.String pTestName)
Queries the list of active prerequisites for the given test

Parameters:
pTestName - name of the test
Returns:
the list of active prerequisites for the test

queryActiveTagValues

java.util.List<TagValue> queryActiveTagValues(java.lang.String pTestName)
Queries the list of active tag values for the given test

Parameters:
pTestName - name of the test
Returns:
list of active tag values

setInputSetList

void setInputSetList(TestInputSetList inputSetList)
Sets the input set list for this test.

Parameters:
inputSetList - the input set list for this test

getInputSetList

TestInputSetList getInputSetList()
Gets the input set list for this test

Returns:
the list of input sets for this test.

fetchInputSetList

TestInputSetList fetchInputSetList()
Fetches the list of input sets for this test.

Returns:
the list of input sets for this test

fetchDefaultInputSetList

TestInputSetList fetchDefaultInputSetList()
Fetches the list of default input sets for this test

Returns:
the list of default input sets for this test

asTestTreeNode

TestTreeNode asTestTreeNode()
Returns this test definition object as a TestTreeNode instance

Returns:
this test definition object as a TestTreeNode instance

removeTagValueIdReference

void removeTagValueIdReference(java.lang.String pTagValueId,
                               boolean pAssocOnly)
Removes the reference to the given tag value ID from this test's definition metadata. References are removed from tag value list as well as prereq list (based on value of pAssocOnly flag - see below)

Removal is performed in the test definition in memory only (i.e. in this object only). The updated definition in memory is not saved to the test repository.

Parameters:
pTagValueId - - tag value ID to remove reference of from this test's metadata.
pAssocOnly - - if true removes only the associations in tag value list. Otherwise removes the entries from prereq list as well.

getDateFormat

java.lang.String getDateFormat()
Get the date format string that be used to encode date parameters

Returns:
date format string

saveErrorTestExec

void saveErrorTestExec(TestRun run,
                       NameValueList inputs,
                       oracle.apps.fnd.appllcm.sdk.common.ResourceRef pErrMsg,
                       java.lang.Throwable t)
Saves a new TestExecution after logging the given exception in it. This API is meant to be called during worker mode execution when the run report is not accessible.

Caution: This api will overwrite any existing Test Execution in the DB.

Parameters:
run - the test run to associate the execution with
inputs - the inputs provided for the test. The execution ID is picked up from this parameter as an internal input.
pErrMsg - the message for the test execution error
t - the exception that occured during execution of this test

populateTestAvailabilityInfo

void populateTestAvailabilityInfo(TestAvailabilityInfo info)
Checks the steps of this test, populates test availability information and recursively gathers availability information of nested tests. Note: Validation of PLSQL procs would have to be done all-at-once by caller (TDF) for all required procs for sake of performance. Validation of PLSQL procs require access to DB.

Parameters:
info - pass-by-reference value object for gathering test availability information

delete

boolean delete()
deletes the test and it's associated data from the db deletes parms, inputsets unlinks the tag values, and prereqs from this test


Oracle Fusion Middleware extensions for Logging and Diagnostics
11g Release 1 (11.1.2)

E22565-02

Copyright © 2011 Oracle. All Rights Reserved.