Package com.piketec.tpt.api
Interface ExecutionStatus
-
- All Superinterfaces:
java.rmi.Remote
,TptRemote
public interface ExecutionStatus extends TptRemote
This object provides an interface to the current state of the test execution which is the information as provided by the "Build Progress" Dialog.- Author:
- Copyright (c) 2014-2024 Piketec GmbH - MIT License (MIT) - All rights reserved
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel()
Cancels the current test execution.java.util.Collection<TestCaseExecutionStatus>
getAllTestCases()
Returns a list containing the execution state (TestCaseExecutionStatus
) for each test case that are part of this test execution.Scenario
getCurrentTestCase()
Return the test case that is currently running (with the stateTestCaseExecutionStatus.TestCaseStatus.Running
).java.util.List<java.lang.String>
getExecutionLog()
GlobalAssessmentStatus
getGlobalAssessmentStatus()
Returns the global assessment state of the overall test execution asGlobalAssessmentStatus
.int
getNumberOfAllTestCases()
Returns the number of all test cases of the current test execution.int
getNumberOfPendingTestCases()
Returns the number of test cases that are part of the current test execution that are currently not finished (with stateTestCaseExecutionStatus.TestCaseStatus.Pending
).TestCaseExecutionStatus.TestCaseStatus
getTotalExecutionStatus()
Returns the current (cumulative) execution state of the overall test execution.boolean
isPending()
boolean
isRunning()
void
join()
Waits for the execution to finish.void
join(int timeout)
Waits for the execution to finish, then returns.
-
-
-
Method Detail
-
isPending
boolean isPending() throws java.rmi.RemoteException
- Returns:
- Indicates whether the test execution is interrupted by user interaction, paused or has not started yet.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
isRunning
boolean isRunning() throws java.rmi.RemoteException
- Returns:
- Indicates whether the test execution is currently running (and not queued, interrupted or finished).
- Throws:
java.rmi.RemoteException
- remote communication problem
-
cancel
void cancel() throws java.rmi.RemoteException
Cancels the current test execution.The outcome of this operation depends on the platform. In the most cases, the execution of the current test case is finished.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getAllTestCases
java.util.Collection<TestCaseExecutionStatus> getAllTestCases() throws java.rmi.RemoteException
Returns a list containing the execution state (TestCaseExecutionStatus
) for each test case that are part of this test execution.- Returns:
- A list containing the states of the executed test cases or an empty list, if no test execution have been started so far.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getNumberOfAllTestCases
int getNumberOfAllTestCases() throws java.rmi.RemoteException
Returns the number of all test cases of the current test execution. Test cases that are part of the test set in more than oneExecutionConfigurationItem
(e.g. in a Back2Back test scenario), will be counted for eachExecutionConfigurationItem
separately.- Returns:
- Number of total test cases executed
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getNumberOfPendingTestCases
int getNumberOfPendingTestCases() throws java.rmi.RemoteException
Returns the number of test cases that are part of the current test execution that are currently not finished (with stateTestCaseExecutionStatus.TestCaseStatus.Pending
).Test cases that are part of the test set in more than one
ExecutionConfigurationItem
(e.g. in a Back2Back test scenario), will be counted for eachExecutionConfigurationItem
separately.- Returns:
- The number of currently not executed test cases.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getCurrentTestCase
Scenario getCurrentTestCase() throws java.rmi.RemoteException
Return the test case that is currently running (with the stateTestCaseExecutionStatus.TestCaseStatus.Running
).- Returns:
- The currently executed test case or
null
if no test case is running. - Throws:
java.rmi.RemoteException
- remote communication problem
-
getTotalExecutionStatus
TestCaseExecutionStatus.TestCaseStatus getTotalExecutionStatus() throws ApiException, java.rmi.RemoteException
Returns the current (cumulative) execution state of the overall test execution.The cumulative execution state is derived from the following priority (from high to low): ResultError, ResultFailed, ResultSuccess, ResultUnknown, Running, Pending
The cumulative state is derived from the highest priority of all test cases and the result of the global assessment.- Returns:
- The test case execution state with the highest priority.
- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- If there are no test in the executed test set.
-
getGlobalAssessmentStatus
GlobalAssessmentStatus getGlobalAssessmentStatus() throws java.rmi.RemoteException
Returns the global assessment state of the overall test execution asGlobalAssessmentStatus
.- Returns:
- The global assessment state.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getExecutionLog
java.util.List<java.lang.String> getExecutionLog() throws java.rmi.RemoteException
- Returns:
- Returns a list of log entries as
String
- Throws:
java.rmi.RemoteException
- remote communication problem
-
join
void join(int timeout) throws ApiException, java.rmi.RemoteException
Waits for the execution to finish, then returns. Returns immediately if execution is already finished. Will return if execution is canceled or paused e.g. because the limit of test cases allowed to fail is reached or some user interaction.- Parameters:
timeout
- The maximum time in seconds to wait for the execution to finish. A timeout of0
or less means to wait forever.- Throws:
ApiException
- If thread is interruptedjava.rmi.RemoteException
- remote communication problem
-
join
void join() throws ApiException, java.rmi.RemoteException
Waits for the execution to finish. Shorthand forjoin(int)
with a timeout 0 or less. Seejoin(int)
for details.- Throws:
ApiException
- If thread is interruptedjava.rmi.RemoteException
- remote communication problem
-
-