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

E22565-06

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

All Superinterfaces:
DiagBObj<TestRun>, DiagConstants, DiagTreeNode, TestMoniterable<TestRun>, TestRunTreeNode
All Known Implementing Classes:
TestRunImpl

public interface TestRun
extends TestMoniterable<TestRun>, TestRunTreeNode

Models a test run by the diagnostic engine.


Nested Class Summary
static interface TestRun.ExecReportLinkProvider
          Provides a call back API that clients can plug-in in order to compute the link to the reports for executions in this run during report extraction.
static interface TestRun.TestRunVisitor
          A callback interface for visiting multiple test run and/or executions.
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.appltest.diagfwk.common.DiagConstants
DiagConstants.ExecutionMode, DiagConstants.Format, DiagConstants.LinkType, DiagConstants.Status
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.facade.TestRunTreeNode
TestRunTreeNode.NodeType
 
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
 void cancel()
          Attempts to cancel this test run by setting the status for this run to canceled in the test repository.
 void completeReport()
          Completes the status for this run.
 void computeLinksInReport()
          Computes the links within the contents of this report as well as any nested reports.
 void copy(TestRun t)
          Copies the contents of the given TestRun into this object
 void delete()
          Deletes the this test run.
 void fetch()
          Fetches the contents of a TestRun.
 void fetch(boolean pFetchExecutions)
          Fetches the contents of a TestRun.
 void fetch(boolean pFetchExecutions, boolean bLoadReport)
          Fetches the contents of a TestRun.
 java.lang.String generateXMLReport()
          Generates the XML Report for the Run from the JAXB content tree and returns it as a String
 java.util.Date getEndTime()
          Gets the end time
 java.lang.String getExecMode()
          Gets the execution mode
 TestRun.ExecReportLinkProvider getExecReportLinkProvider()
          Gets the execution report link provider that may have been set previously on this run by calling setExecReportLinkProvider().
 int getMonitorInterval()
          Get the Monitor interval Run Parameter for this run
 int getNumberOfThreads()
          Get the Number of Threads Run Parameter for this run
 TestReportExtn getReportObj()
          Return the report object for this run
 java.lang.String getRequestId()
          Gets the request id
 java.lang.String getRunId()
          Gets the run ID
 java.lang.String getRunName()
          Gets the run description
 java.lang.String getRunReport()
          Gets the run report
 java.util.Date getStartTime()
          Gets the start time
 java.lang.String getStatus()
          Gets the status
 TestExecList getTestExecList()
          Returns the list of associated child executions
 java.lang.Boolean getViewReportAllowed()
          Returns whether viewing the run report is allowed for the current user
 void initializeReport(NameValueList pRunArgs)
          Initializes the run report and logs the given run arguments into the report.
 void logError(oracle.apps.fnd.appllcm.sdk.common.ResourceRef pErrMsg, java.lang.Throwable t)
          Logs the given error message and stack trace to the Run Report's Engine Log Section.
 void logMessage(oracle.apps.fnd.appllcm.sdk.common.ResourceRef pMsg)
          Logs the given message to the Run Report's Engine Log Section.
 void setEndTime(java.util.Date pEndTime)
          Sets the end time
 void setExecMode(java.lang.String pExecMode)
          Sets the execution mode
 void setExecReportLinkProvider(TestRun.ExecReportLinkProvider provider)
          Sets an execution report link provider for this run to be used in order to generate links to the execution reports for this run that can be embedded into this run report
 void setMonitorInterval(int value)
          Set the Monitor interval Run Parameter for this run
 void setNumberOfThreads(int value)
          Set the Number of Threads Run Parameter for this run
 void setRequestId(java.lang.String pRequestId)
          Sets the request id
 void setRunId(java.lang.String pRunId)
          Sets the Run ID
 void setRunName(java.lang.String pRunName)
          Sets the run description
 void setRunReport(java.lang.String pRunReport)
          Sets the run report
 void setStartTime(java.util.Date pStartTime)
          Sets the start time
 void setStatus(java.lang.String pStatus)
          Sets the status
 void setTestExecList(TestExecList pTestExecList)
          Sets the test execution list for the test run
 void translateReport()
          Translates the translatable contents of this report to user's session language.
 void visitAll(TestRun.TestRunVisitor pVisitor)
          Traverses this Run as well as all Exections under this Run and invokes the appropriate "visit()" method on the TestRunVisitor for each node.
 java.lang.String writeReport(java.lang.String pOutDir, boolean pWriteExecutions, DiagConstants.Format pFormat)
          Writes the contents of this run's report in the specified format to the given output directory.
 java.lang.String writeReport(java.lang.String pOutDir, DiagConstants.Format pFormat)
          Writes the contents of this run's report in the specified format to the given output directory.
 java.lang.String writeReportHTML(java.lang.String pOutDir)
          Writes the contents of this run's report in HTML format to the given output directory.
 java.lang.String writeReportHTML(java.lang.String pOutDir, boolean pWriteExecutions)
          Writes the contents of this run's report in HTML format to the given output directory.
 java.lang.String writeReportXML(java.lang.String pOutDir)
          Writes the report for this run as well as all included executions to the given output directory.
 java.lang.String writeReportXML(java.lang.String pOutDir, boolean pWriteExecutions)
          Writes the report for this run to the given output directory.
 
Methods inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.TestMoniterable
checkCanceled, checkDone, isDone, save
 
Methods inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.DiagBObj
copyT, getCreatedBy, getCreationDate, getLastUpdateDate, getLastUpdatedBy, getLastUpdateLogin, isCreatedByOracle, setCreatedBy, setCreationDate, setLastUpdateDate, setLastUpdatedBy, setLastUpdateLogin
 
Methods inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.facade.TestRunTreeNode
getChildren, getCreatedBy, getDiagStatus, getDisplayName, getElapsedTime, getExecStatus, getID, getName, getNodeReportObj, getNodeType, getRunBy, hasReport, isDone
 
Methods inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.facade.DiagTreeNode
hasChildren
 

Method Detail

getRunId

java.lang.String getRunId()
Gets the run ID

Returns:
the run ID

getRunName

java.lang.String getRunName()
Gets the run description

Returns:
the run name

getExecMode

java.lang.String getExecMode()
Gets the execution mode

Returns:
the execution mode

getStatus

java.lang.String getStatus()
Gets the status

Specified by:
getStatus in interface TestMoniterable<TestRun>
Specified by:
getStatus in interface TestRunTreeNode
Returns:
the status

getStartTime

java.util.Date getStartTime()
Gets the start time

Specified by:
getStartTime in interface TestRunTreeNode
Returns:
the start time

getEndTime

java.util.Date getEndTime()
Gets the end time

Specified by:
getEndTime in interface TestRunTreeNode
Returns:
the end time

getRequestId

java.lang.String getRequestId()
Gets the request id

Returns:
the request id

getRunReport

java.lang.String getRunReport()
Gets the run report

Returns:
the run report

getTestExecList

TestExecList getTestExecList()
Returns the list of associated child executions

Returns:
the list of associated child executions

getMonitorInterval

int getMonitorInterval()
Get the Monitor interval Run Parameter for this run

Returns:

getNumberOfThreads

int getNumberOfThreads()
Get the Number of Threads Run Parameter for this run

Returns:

setMonitorInterval

void setMonitorInterval(int value)
Set the Monitor interval Run Parameter for this run


setNumberOfThreads

void setNumberOfThreads(int value)
Set the Number of Threads Run Parameter for this run


setRunId

void setRunId(java.lang.String pRunId)
Sets the Run ID

Parameters:
pRunId - the Run ID

setRunName

void setRunName(java.lang.String pRunName)
Sets the run description

Parameters:
pRunName - the run description

setExecMode

void setExecMode(java.lang.String pExecMode)
Sets the execution mode

Parameters:
pExecMode - the execution mode

setStatus

void setStatus(java.lang.String pStatus)
Sets the status

Parameters:
pStatus - the status

setStartTime

void setStartTime(java.util.Date pStartTime)
Sets the start time

Parameters:
pStartTime - the start time

setEndTime

void setEndTime(java.util.Date pEndTime)
Sets the end time

Parameters:
pEndTime - the end time

setRequestId

void setRequestId(java.lang.String pRequestId)
Sets the request id

Parameters:
pRequestId - the request id

setRunReport

void setRunReport(java.lang.String pRunReport)
Sets the run report

Parameters:
pRunReport - the run report

getViewReportAllowed

java.lang.Boolean getViewReportAllowed()
Returns whether viewing the run report is allowed for the current user

Specified by:
getViewReportAllowed in interface TestRunTreeNode
Returns:
true if viewing is allowed

setTestExecList

void setTestExecList(TestExecList pTestExecList)
Sets the test execution list for the test run

Parameters:
pTestExecList - the run execution list

initializeReport

void initializeReport(NameValueList pRunArgs)
Initializes the run report and logs the given run arguments into the report. Also sets other internal attributes into the report such as run id etc.

Parameters:
pRunArgs - parameter name values that were used to invoke this run.

logMessage

void logMessage(oracle.apps.fnd.appllcm.sdk.common.ResourceRef pMsg)
Logs the given message to the Run Report's Engine Log Section. The Report must be initialized prior to calling this method otherwise an IllegalStateException will be thrown.

Parameters:
pMsg - Message to log.

logError

void logError(oracle.apps.fnd.appllcm.sdk.common.ResourceRef pErrMsg,
              java.lang.Throwable t)
Logs the given error message and stack trace to the Run Report's Engine Log Section. The Report must be initialized prior to calling this method otherwise an IllegalStateException will be thrown.

Parameters:
pErrMsg - Error message to log
t - Throwable whose stack trace will be logged.

completeReport

void completeReport()
Completes the status for this run. Updates the final status on the test run report as well as on this object.


copy

void copy(TestRun t)
Copies the contents of the given TestRun into this object

Parameters:
t - The TestRun instance to copy from.

fetch

void fetch()
Fetches the contents of a TestRun. Either a run_id or a run_name must be set on this object prior to calling this API. This API fetches all executions under this run as well. and it checks for view report security permission


fetch

void fetch(boolean pFetchExecutions)
Fetches the contents of a TestRun. Either a run_id or a run_name must be set on this object prior to calling this API. This API fetches data with view report security check

Parameters:
pFetchExecutions - flag to indicate whether the API should fetch included executions or not. If false, only fetches attributes of the run. Otherwise fetches all incldues executions under this run as well.

fetch

void fetch(boolean pFetchExecutions,
           boolean bLoadReport)
Fetches the contents of a TestRun. Either a run_id or a run_name must be set on this object prior to calling this API.

Parameters:
pFetchExecutions - flag to indicate whether the API should fetch included executions or not. If false, only fetches attributes of the run. Otherwise fetches all incldues executions under this run as well.
bLoadReport - flag to indicate whether the test report should be loaded on the fetch. If it should be loaded, the report view permission will be checked.

generateXMLReport

java.lang.String generateXMLReport()
Generates the XML Report for the Run from the JAXB content tree and returns it as a String

Returns:
XML report for the run

writeReportXML

java.lang.String writeReportXML(java.lang.String pOutDir,
                                boolean pWriteExecutions)
Writes the report for this run to the given output directory. Additionally if pWriteExecutions is set to true, it will also write the reports for all executions in this run to the output directory.

The filenames for the report files are based on the GUID for the run or execution.

Parameters:
pOutDir - output directory where the report file(s) are written to.
pWriteExecutions - if true writes the test reports for all executions in this run. Otherwise writes only the report for this run.
Returns:
the full file path of the output file where the report for this run was written to.

writeReportXML

java.lang.String writeReportXML(java.lang.String pOutDir)
Writes the report for this run as well as all included executions to the given output directory.

The file names for the report files are based on the GUIDs for the respective runs or executions.

Parameters:
pOutDir - output directory where the report file(s) are written to.
Returns:
the full file path of the output file where the report for this run was written to.

writeReportHTML

java.lang.String writeReportHTML(java.lang.String pOutDir,
                                 boolean pWriteExecutions)
Writes the contents of this run's report in HTML format to the given output directory. Performs a XSL transformation in order to generate the HTML output.

Additionally if pWriteExecutions is set to true, it will also write the reports for all included executions to the output directory.

The file names for the report files are based on the GUIDs for the respective run or execution(s).

Parameters:
pOutDir - output directory where the report files are generated.
pWriteExecutions - - if true writes the test reports for all included executions in this run. Otherwise writes only the report for this run.
Returns:
the full file path to the output file.

writeReportHTML

java.lang.String writeReportHTML(java.lang.String pOutDir)
Writes the contents of this run's report in HTML format to the given output directory. Performs a XSL transformation in order to generate the HTML output.

Additionally, this method also writes the reports for all included executions to the output directory.

The file names for the report files are based on the GUIDs for the respective run or execution(s).

Parameters:
pOutDir - output directory where the report files are generated.
Returns:
the full file path to the output file.

writeReport

java.lang.String writeReport(java.lang.String pOutDir,
                             DiagConstants.Format pFormat)
Writes the contents of this run's report in the specified format to the given output directory.

Additionally, this method also writes the reports for all included executions to the output directory.

The file names for the report files are based on the GUIDs for the respective run or execution(s).

Parameters:
pOutDir - output directory where the report files are generated.
pFormat - format for the output e.g. XML or HTML
Returns:
the full file path to the output file.

writeReport

java.lang.String writeReport(java.lang.String pOutDir,
                             boolean pWriteExecutions,
                             DiagConstants.Format pFormat)
Writes the contents of this run's report in the specified format to the given output directory.

Additionally if pWriteExecutions is set to true, it will also write the reports for all included executions to the output directory.

The file names for the report files are based on the GUIDs for the respective run or execution(s).

Parameters:
pOutDir - output directory where the report files are generated.
pWriteExecutions - - if true writes the test reports for all included executions in this run. Otherwise writes only the report for this run.
pFormat - - Format for the output e.g. XML or HTML
Returns:
the full file path to the output file.

getReportObj

TestReportExtn getReportObj()
Return the report object for this run

Returns:
the report object for this run

translateReport

void translateReport()
Translates the translatable contents of this report to user's session language.


computeLinksInReport

void computeLinksInReport()
Computes the links within the contents of this report as well as any nested reports.


setExecReportLinkProvider

void setExecReportLinkProvider(TestRun.ExecReportLinkProvider provider)
Sets an execution report link provider for this run to be used in order to generate links to the execution reports for this run that can be embedded into this run report

Parameters:
provider - an instance of ExecReportLinkProvider that can be used to create links to the execution reports.

getExecReportLinkProvider

TestRun.ExecReportLinkProvider getExecReportLinkProvider()
Gets the execution report link provider that may have been set previously on this run by calling setExecReportLinkProvider(). If no such provider exists, then returns null.

Returns:
the execution report link provider that may have been set previously on this run by calling setExecReportLinkProvider(). If no such provider exists, then returns null.

cancel

void cancel()
Attempts to cancel this test run by setting the status for this run to canceled in the test repository. Caller must have set the test ID or test Name on this object prior to invoking this method.


delete

void delete()
            throws DiagfwkException
Deletes the this test run. Only allows delete if the run is not currently in running status. If delete is called on a currently running test run a DiagfwkException will be thrown

Throws:
DiagfwkException - when any error occurs during the deletion process.

visitAll

void visitAll(TestRun.TestRunVisitor pVisitor)
Traverses this Run as well as all Exections under this Run and invokes the appropriate "visit()" method on the TestRunVisitor for each node.

This method initially invokes pVisitor.visit(TestRun) with this run object. Subsequently, it invokes pVisitor.visit(TestExec) for each execution in the run including nested executions (if any).

Parameters:
pVisitor - TestRunVisitor performing the visit on this run.

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

E22565-06

Copyright © 2012 Oracle. All Rights Reserved.