Package com.piketec.tpt.api
Interface Scenario
-
- All Superinterfaces:
IdentifiableRemote
,NamedObject
,java.rmi.Remote
,ScenarioOrGroup
,TptRemote
- All Known Subinterfaces:
DiagramScenario
,StepListScenario
public interface Scenario extends ScenarioOrGroup
Either a test case or a Diagram/StepList variant of a TestLet.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkForNewRevision()
Returnstrue
if this scenario has been modified since the last status history entry or if its status is "new" and marks it red in 'Status' view.java.lang.String
getCompileError()
Returnsnull
if scenario can be compiled without errors, the compile error message otherwise.Status
getCurrentStatus()
Returns the current review status of the scenario.RemoteCollection<Requirement>
getLinkedRequirements()
Get all requirements currently linked to this scenario.RemoteList<Status>
getStatusHistory()
Returns a list of all status history entries of the scenario, the newest comes first.java.io.File
getTestDataDirectory(ExecutionConfigurationItem execConfigItem)
Returns the test data directory of scenario for a given execution configuration item.boolean
isStatusOutdated()
Returnstrue
if this scenario is marked as "modified"(=outdated) or if its status is "new" (marked red in 'Status' view).-
Methods inherited from interface com.piketec.tpt.api.IdentifiableRemote
getIdentifier
-
Methods inherited from interface com.piketec.tpt.api.NamedObject
getName, setName
-
Methods inherited from interface com.piketec.tpt.api.ScenarioOrGroup
copy, getDescription, getGroup, getId, getIdString, getInitialValue, getTestCaseAttributeValue, getTestlet, isTestcaseOrGroup, move, setDescription, setInitialValue, setStatus, setTestCaseAttributeValue
-
-
-
-
Method Detail
-
getLinkedRequirements
RemoteCollection<Requirement> getLinkedRequirements() throws java.rmi.RemoteException
Get all requirements currently linked to this scenario. The content of the collection is only a snapshot of the current state but removing items from this list will remove the link in TPT anyway even if the link was created after receiving this collection.- Returns:
- The currently linked requirements.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getTestDataDirectory
java.io.File getTestDataDirectory(ExecutionConfigurationItem execConfigItem) throws java.rmi.RemoteException, ApiException
Returns the test data directory of scenario for a given execution configuration item. Since ${tpt.date} and ${tpt.time} placeholders are only valid during runtime they cannot be used in the test data path and anApiException
will be thrown.- Parameters:
execConfigItem
- The execution configuration item to calculate the test data directory.- Returns:
- The test data directory as an absolute file
- Throws:
ApiException
- If the execution configuration does not belong to the model of the scenario, the execution configuration has no platform configuration set or the test data path of the execution configuration has unresolvable placeholder variables.java.rmi.RemoteException
- remote communication problem
-
getCompileError
java.lang.String getCompileError() throws java.rmi.RemoteException, ApiException
Returnsnull
if scenario can be compiled without errors, the compile error message otherwise.- Returns:
- The compile error message or
null
- Throws:
ApiException
- If scenario is not part of a project anymore or compiler is inactive for the project.java.rmi.RemoteException
- remote communication problem
-
getCurrentStatus
Status getCurrentStatus() throws java.rmi.RemoteException
Returns the current review status of the scenario.- Returns:
- The current status or
null
if status is "new". - Throws:
java.rmi.RemoteException
- remote communication problem
-
getStatusHistory
RemoteList<Status> getStatusHistory() throws java.rmi.RemoteException
Returns a list of all status history entries of the scenario, the newest comes first.- Returns:
- A list of all
Statuses
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
checkForNewRevision
boolean checkForNewRevision() throws java.rmi.RemoteException
Returnstrue
if this scenario has been modified since the last status history entry or if its status is "new" and marks it red in 'Status' view. Otherwise, returnsfalse
.- Returns:
true
if it is modified or newfalse
if it is up-to-date
- Throws:
java.rmi.RemoteException
- remote communication problem
-
isStatusOutdated
boolean isStatusOutdated() throws java.rmi.RemoteException
Returnstrue
if this scenario is marked as "modified"(=outdated) or if its status is "new" (marked red in 'Status' view). Otherwise, returnsfalse
.- Returns:
true
if it is outdated or newfalse
if it is up-to-date
- Throws:
java.rmi.RemoteException
- remote communication problem
-
-