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

E22565-02

oracle.apps.fnd.appltest.diagfwk.engine.provider.dao
Interface TestRunDAO

All Superinterfaces:
BaseDAO
All Known Implementing Classes:
OADBTestRunDAO

public interface TestRunDAO
extends BaseDAO

Provide Data Access APIs for Test Run related information.


Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.BaseDAO
BaseDAO.DBSessionInfo
 
Method Summary
 void deleteRun(java.lang.String pRunId)
          Deletes the run with the given run ID (including all the executions in the run).
 void deleteRuns(java.lang.String[] pRunIds)
          Deletes runs with the given set of run IDs.
 boolean existsExecution(java.lang.String pExecutionId)
          Checks to see if an Execution with the given Execution ID exists.
 boolean existsRun(java.lang.String pRunId)
          Checks to see if a Run with the given Run ID exists.
 TestExec fetch(java.lang.String pExecId)
          Queries Diagnostic Test Execution data in the repository to fetch TestExec object.
 TestRun fetch(java.lang.String pRunId, boolean pFetchExecs)
          Queries Diagnostic Run data in the repository to fetch TestRun object.
 TestRun fetch(java.lang.String pRunId, boolean pFetchExecs, boolean bLoadReport)
          Queries Diagnostic Run data in the repository to fetch TestRun object.
 TestRun fetchByRunName(java.lang.String pRunName, boolean pFetchExecs)
          Queries Diagnostic Run data in the repository to fetch TestRun object.
 TestRun fetchByRunName(java.lang.String pRunName, boolean pFetchExecs, boolean bLoadReport)
          Queries Diagnostic Run data in the repository to fetch TestRun object.
 TestExec fetchExecution(java.lang.String pExecId, boolean pIncludeChildren)
          Gets the test execution for the given execution ID.
 TestExec fetchExecution(java.lang.String pExecId, boolean pIncludeChildren, boolean bLoadReport)
          Gets the test execution for the given execution ID.
 TestExecList fetchExecutions(java.lang.String pRunId)
          Fetches the executions for the given test run.
 TestExecList fetchExecutions(java.lang.String pRunId, boolean bLoadReport)
          Fetches the executions for the given test run.
 TestExec fetchTestExec(java.lang.String pExecId, boolean bLoadReport)
          Queries Diagnostic Test Execution data in the repository to fetch TestExec object.
 int getQueryRunsMaxLimit()
          Returns the maximum limit on the number of rows returned by the query runs API.
 java.lang.String queryExecStatus(java.lang.String pExecId)
          Queries the status of the given execution ID
 TestExecList queryImmediateChildExecutions(java.lang.String pParentExecId)
          Queries the immediate test executions for the given execution ID.
 TestExecList queryImmediateExecutions(java.lang.String pRunId)
          Queries the immediate test executions for the given run ID.
 java.lang.String queryRunId(java.lang.String pRunName)
          Queries the Run ID for the given Run name.
 TestRunList queryRuns(java.lang.String[] pStatusCodes, java.lang.Long pTimeInterval, java.lang.String pRunByUser, java.util.Date pFromDate, java.util.Date pToDate, java.lang.String pRunName, java.lang.String pTestDisplayName)
          Queries test runs based on the given criteria.
 java.lang.String queryRunStatus(java.lang.String pRunId)
          Queries the status of the given run ID
 void save(TestExec exec)
          Saves the given TestExec object into the repository.
 void save(TestRun pTestRun)
          Saves the given TestRun object into the repository.
 void updateRunStatus(TestRun pRun, java.lang.String pExpectedCurrentStatusCode, java.lang.String pNewStatusCode, java.lang.String pExecStatusCodeToUpdate)
          Updates the status of the given run to the specified status code.
 
Methods inherited from interface oracle.apps.fnd.appltest.diagfwk.engine.provider.dao.BaseDAO
createSysGuid, getDBSessionInfo, queryNlsParameters, querySysDate, querySysDate
 

Method Detail

save

void save(TestExec exec)
Saves the given TestExec object into the repository. If an execution ID is not set in the TestExec object, the API createes a new execution in the repository. If an execution ID is set, it will update the record for the existing execution in the repository.

Parameters:
exec - TestExec representing a particular test execution to be saved into the test repository.

save

void save(TestRun pTestRun)
Saves the given TestRun object into the repository. If a Run ID is not set in the TestRun object, the API createes a new run in the repository. If an run ID is set, it will update the record for the existing run in the repository.

Parameters:
pTestRun - TestRun representing a particular test run to be saved into the test repository.

fetch

TestRun fetch(java.lang.String pRunId,
              boolean pFetchExecs)
Queries Diagnostic Run data in the repository to fetch TestRun object. If pFetchExecs is true, fetch returns TestRun object with all child TestExec objects, if present; otherwise, it simply retruns summary level TestRun object information. This fetch will check for report security permission.

Parameters:
pRunId - a GUID representing TestRun object
pFetchExecs - - set true for returning all child TestExecs for a giveb TestRun
Returns:
TestRun object

fetch

TestRun fetch(java.lang.String pRunId,
              boolean pFetchExecs,
              boolean bLoadReport)
Queries Diagnostic Run data in the repository to fetch TestRun object. If pFetchExecs is true, fetch returns TestRun object with all child TestExec objects, if present; otherwise, it simply retruns summary level TestRun object information.

Parameters:
pRunId - a GUID representing TestRun object
pFetchExecs - - set true for returning all child TestExecs for a giveb TestRun
bLoadReport - flag that indicates whether the fetch should check for view report security permission and load the report if allowed
Returns:
TestRun object

fetchByRunName

TestRun fetchByRunName(java.lang.String pRunName,
                       boolean pFetchExecs)
Queries Diagnostic Run data in the repository to fetch TestRun object. If pFetchExecs is true, fetch returns TestRun object with all child TestExec objects, if present; otherwise, it simply retruns summary level TestRun object information. This fetch will check for report security permission.

Parameters:
pRunName - name of the run for which to fetch details
pFetchExecs - flag that indicates whether included test executions should also be fetched.
Returns:
TestRun object

fetchByRunName

TestRun fetchByRunName(java.lang.String pRunName,
                       boolean pFetchExecs,
                       boolean bLoadReport)
Queries Diagnostic Run data in the repository to fetch TestRun object. If pFetchExecs is true, fetch returns TestRun object with all child TestExec objects, if present; otherwise, it simply retruns summary level TestRun object information.

Parameters:
pRunName - name of the run for which to fetch details
pFetchExecs - flag that indicates whether included test executions should also be fetched.
bLoadReport - flag that indicates whether the fetch should check for view report security permission and load the report if allowed
Returns:
TestRun object

fetchExecutions

TestExecList fetchExecutions(java.lang.String pRunId)
Fetches the executions for the given test run. This fetch checks for view report security permission.

Parameters:
pRunId - Run GUID for the test run
Returns:
TestExecList object containing list of all the executions for that run. All nested executions are also fetched.

fetchExecutions

TestExecList fetchExecutions(java.lang.String pRunId,
                             boolean bLoadReport)
Fetches the executions for the given test run.

Parameters:
pRunId - Run GUID for the test run
bLoadReport - flag that indicates whether the fetch should check for view report security permission and load the report if allowed
Returns:
TestExecList object containing list of all the executions for that run. All nested executions are also fetched.

fetch

TestExec fetch(java.lang.String pExecId)
Queries Diagnostic Test Execution data in the repository to fetch TestExec object. This API calls fetchTestExec() and it does not fetch the child executions for the given execution ID.

Parameters:
pExecId - - A GUID, representing a TestExec object
Returns:
TestExec object

fetchTestExec

TestExec fetchTestExec(java.lang.String pExecId,
                       boolean bLoadReport)
Queries Diagnostic Test Execution data in the repository to fetch TestExec object. This API does not fetch the child executions for the given execution ID.

Parameters:
pExecId - - A GUID, representing a TestExec object
bLoadReport - flag that indicates whether the fetch should check for view report security permission and load report if allowed
Returns:
TestExec object

queryRunId

java.lang.String queryRunId(java.lang.String pRunName)
Queries the Run ID for the given Run name.

Parameters:
pRunName - name for the run.
Returns:
the Run ID for the given Run name if such a test run already exists. Otherwise returns null.

fetchExecution

TestExec fetchExecution(java.lang.String pExecId,
                        boolean pIncludeChildren)
Gets the test execution for the given execution ID. Additionally, if pIncludeChildren flag is set to true, the child executions (if any) for the given execution ID are also included.

Parameters:
pExecId - execution ID to fetch
pIncludeChildren - if true, the API will also fetch child executions (if any exist) for the given execution ID.
Returns:
a TestExec object populated with the details for the given execution ID.

fetchExecution

TestExec fetchExecution(java.lang.String pExecId,
                        boolean pIncludeChildren,
                        boolean bLoadReport)
Gets the test execution for the given execution ID. Additionally, if pIncludeChildren flag is set to true, the child executions (if any) for the given execution ID are also included.

Parameters:
pExecId - execution ID to fetch
pIncludeChildren - if true, the API will also fetch child executions (if any exist) for the given execution ID.
bLoadReport - if true, the API will check the report view permission and load the report if allowed
Returns:
a TestExec object populated with the details for the given execution ID.

queryRuns

TestRunList queryRuns(java.lang.String[] pStatusCodes,
                      java.lang.Long pTimeInterval,
                      java.lang.String pRunByUser,
                      java.util.Date pFromDate,
                      java.util.Date pToDate,
                      java.lang.String pRunName,
                      java.lang.String pTestDisplayName)
Queries test runs based on the given criteria.

Parameters:
pStatusCodes - status codes for the test run. All runs with these status codes are fetched.
pTimeInterval - time interval in seconds that specifies the interval for querying test runs. All runs that started with the last specified number of seconds are fetched
pRunByUser - user like predicate to limit the list runs by
pFromDate - all runs started after this date are fetched
pToDate - all runs started before this date are fetched
pRunName - all runs with run names like this run name are fetched
Returns:
list of test runs that meet the status and time interval criteria.

queryImmediateExecutions

TestExecList queryImmediateExecutions(java.lang.String pRunId)
Queries the immediate test executions for the given run ID.

Parameters:
pRunId - run ID for which to query the executions
Returns:
the list of immediate child test executions for the given run ID.

queryImmediateChildExecutions

TestExecList queryImmediateChildExecutions(java.lang.String pParentExecId)
Queries the immediate test executions for the given execution ID.

Parameters:
pParentExecId - parent execution ID for which to query the child executions
Returns:
the list of immediate child test executions for the given parent execution id.

updateRunStatus

void updateRunStatus(TestRun pRun,
                     java.lang.String pExpectedCurrentStatusCode,
                     java.lang.String pNewStatusCode,
                     java.lang.String pExecStatusCodeToUpdate)
Updates the status of the given run to the specified status code. Also updates status of any nested executions

Parameters:
pRun - Test Run for which to update the status. The run ID attribute for the test run must be set on the instance.
pExpectedCurrentStatusCode - the current expected status code of the run. If the run is not in the expected status code at the time of update then an exception is thrown and update is not performed. If null, update is always performed regardless of current status.
pNewStatusCode - the new status code to update to.
pExecStatusCodeToUpdate - Any nested executions for the given run with with this status code are also updated to the new status code. If this is null, then status of nested executions are not updated.

queryRunStatus

java.lang.String queryRunStatus(java.lang.String pRunId)
Queries the status of the given run ID

Parameters:
pRunId - run ID
Returns:
the current status code for the given run ID

queryExecStatus

java.lang.String queryExecStatus(java.lang.String pExecId)
Queries the status of the given execution ID

Parameters:
pExecId - the execution ID
Returns:
the current status code for the given execution ID

deleteRun

void deleteRun(java.lang.String pRunId)
Deletes the run with the given run ID (including all the executions in the run).

Parameters:
pRunId - ID for the run to delete.

deleteRuns

void deleteRuns(java.lang.String[] pRunIds)
Deletes runs with the given set of run IDs. Deletes all corresponding executions for the runs as well.

Parameters:
pRunIds - list of run IDs to delete.

getQueryRunsMaxLimit

int getQueryRunsMaxLimit()
Returns the maximum limit on the number of rows returned by the query runs API. The maximum limit is configurable by setting a system property "diagfwk.queryruns.limit" and has a default value of 200.

Returns:
maximum limit on the number of rows returned by the query runs API.

existsRun

boolean existsRun(java.lang.String pRunId)
Checks to see if a Run with the given Run ID exists.

Parameters:
pRunId - Run ID
Returns:
true if the Run exists. Returns false otherwise.

existsExecution

boolean existsExecution(java.lang.String pExecutionId)
Checks to see if an Execution with the given Execution ID exists.

Parameters:
pExecutionId - Execution ID
Returns:
true if the Execution exists. Returns false otherwise.

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

E22565-02

Copyright © 2011 Oracle. All Rights Reserved.