TPTP 4.6.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

ExecutionUtil.java


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 startDate, long endDate)
          Resolves the list of execution results for a list of tests created in date and time window (end date and time - start date and time).
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 startDate, long endDate)
          Resolves the list of execution results for a test created in date and time window (end date and time - start date and time).
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 startDate,
                                                  long endDate)

Resolves the list of execution results for a test created in date and time window (end date and time - start date and time).

NOTE: This method opens all the execution results in the workspace to resolve the creation time stamp. As such, this method is extremely processor, disk, and memory intensive.

NOTE: If the start date and time is 0 or negative, it defaults to 12:00.00 AM of the current date. Similarly, if the end date and time is 0 or negative, it defaults to current date and time

Parameters:
test - The test to to resolve the list of execution results.
startDate - The start date and time of the date and time window.
endDate - The start date and time of the date and time window.
Returns:
A non-null list of execution results for the test created in date and time window (end date and time - start date and time).

findExecutionResults

public static java.util.Map findExecutionResults(java.util.List tests,
                                                 long startDate,
                                                 long endDate)

Resolves the list of execution results for a list of tests created in date and time window (end date and time - start date and time).

NOTE: This method opens all the execution results in the workspace to resolve the creation time stamp. As such, this method is extremely processor, disk, and memory intensive.

NOTE: If the start date and time is 0 or negative, it defaults to 12:00.00 AM of the current date. Similarly, if the end date and time is 0 or negative, it defaults to current date and time

Parameters:
tests - The list of test to to resolve the list of execution results.
startTime - The start date and time of the date and time window.
endTime - The start date and time of the date and time window.
Returns:
A non-null list of execution results for the list of tests created in date and time window (end date and time - start date and time).

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.6.0 Platform Project
Public API Specification