TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.hyades.models.common.util
Class ExecutionUtil

java.lang.Object
  extended by org.eclipse.hyades.models.common.util.ExecutionUtil

public class ExecutionUtil
extends java.lang.Object


Constructor Summary
ExecutionUtil()
           
 
Method Summary
static void addReferencedTestSuites(TPFTestSuite testSuite, java.util.List referencedTestSuites)
          Recursively adds all referenced test suites from and including the parameter root test suite.
static boolean containsTestCaseInvocations(TPFTestSuite testSuite)
          Determines if the parameter test suite contains at least one test case invocation.
static java.util.List findAllExecutionResults(TPFTest test)
          Returns a list with the execution results of a given test.
static java.util.Map findExecutionResults(java.util.List tests)
          Returns a map with the list of execution results for each test in the argument.
static java.util.Map findExecutionResults(java.util.List tests, long startTime, long endTime)
           
static java.util.List findExecutionResults(TPFTest test)
          Returns a list with the execution results of a given test.
static java.util.List findExecutionResults(TPFTest test, long startTime, long endTime)
          Returns a list with the execution results of a given test.
static java.util.List getVerdictEvents(TPFExecutionResult testExecutionResult)
          Resolves the list (TPFVerdictEvent) of verdict events from the parameter root execution result.
static int resolveTestCaseCount(TPFTestSuite testSuite)
          Recursively resolves the count of all test invocations for the parameter test suite.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionUtil

public ExecutionUtil()
Method Detail

findExecutionResults

public static java.util.List findExecutionResults(TPFTest test)
Returns a list with the execution results of a given test. The execution results are queried from the workspace based on matching the test suite's name.

Parameters:
test -
Returns:
a not null list

findExecutionResults

public static java.util.List findExecutionResults(TPFTest test,
                                                  long startTime,
                                                  long endTime)
Returns a list with the execution results of a given test. The execution results are queried from the workspace based on opening every execution result that have the timestamp in the specified range and comparing the referenced test to the specified test Warning -- this is an extremely processor, disk & memory intensive operation.

Parameters:
test -
startTime - if positive specifies the absolute start time stamp (like Date.getTime()), if negative or 0 specifies the start time stamp relative to the current time (the time when this method is called)
endTime - if positive specifies the absolute end time stamp (like Date.getTime()), if negative or 0 specifies the end time stamp relative to the current time (the time when this method is called)
Returns:
a not null list

findExecutionResults

public static java.util.Map findExecutionResults(java.util.List tests,
                                                 long startTime,
                                                 long endTime)

findAllExecutionResults

public static java.util.List findAllExecutionResults(TPFTest test)
Returns a list with the execution results of a given test. The execution results are queried from the workspace based on opening every execution result and comparing the referenced test to the specified test Warning -- this is an extremely processor, disk & memory intensive operation.

Parameters:
test -
Returns:
a not null list

findExecutionResults

public static java.util.Map findExecutionResults(java.util.List tests)
Returns a map with the list of execution results for each test in the argument. The execution results are queried from the workspace.

The tests are supposed to be located in the same ResourceSet.

Parameters:
test -
Returns:
a not null list

addReferencedTestSuites

public static void addReferencedTestSuites(TPFTestSuite testSuite,
                                           java.util.List referencedTestSuites)
Recursively adds all referenced test suites from and including the parameter root test suite.

Referenced test suites are defined as invocations of external test suites.

Only referenced test suites not in the parameter list (TPFTestSuite) are added. As such, the parameter list (TPFTestSuite) does not contain duplicate test suites.

Parameters:
testSuite - The root test suite.
referencedTestSuites - The list (TPFTestSuite) of referenced test suites.

containsTestCaseInvocations

public static boolean containsTestCaseInvocations(TPFTestSuite testSuite)
Determines if the parameter test suite contains at least one test case invocation.

A test case invocation constitutes one of the following:

Note, an invocation of a referenced test suite does not constitute a test case invocation.

Parameters:
testSuite - The test suite.
Returns:
True if the parameter test suite contains at least one test case invocation, otherwise false.

resolveTestCaseCount

public static int resolveTestCaseCount(TPFTestSuite testSuite)
Recursively resolves the count of all test invocations for the parameter test suite.

A test case invocation constitutes one of the following:

Note, an invocation of a referenced test suite recursively resolves the count of all test invocations for the referenced test suite. The referenced test suite is not counted.

Parameters:
testSuite - The test suite.
Returns:
The count of all test invocations for the parameter test suite.

getVerdictEvents

public static java.util.List getVerdictEvents(TPFExecutionResult testExecutionResult)
Resolves the list (TPFVerdictEvent) of verdict events from the parameter root execution result.

Parameters:
testExecutionResult - The root execution result.
Returns:
The list (TPFVerdictEvent) of verdict events.

TPTP 4.5.0 Platform Project
Public API Specification