Package com.piketec.tpt.api
Interface Scenario
-
- All Superinterfaces:
IdentifiableRemote
,NamedObject
,java.rmi.Remote
,ScenarioOrGroup
,TptRemote
,UUIDObject
- All Known Subinterfaces:
DiagramScenario
,StepListScenario
public interface Scenario extends ScenarioOrGroup
Either a test case or a Diagram/StepList variant of a TestLet. *In TPT, it represents both the variants as well as the test cases. Create new
Scenarios
viaTestlet.createDiagVariant(String, ScenarioGroup)
orTestlet.createSLVariant(String, ScenarioGroup)
.- See Also:
Project.getTopLevelTestlet()
-
-
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 it has no revision.java.lang.String
exportTestSpecification()
Generates a specification for this scenario including the initial values.java.lang.String
getCompileError()
Returnsnull
if scenario can be compiled without errors, the compile error message otherwise.Status
getCurrentStatus()
Returns the current 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 has no revision.-
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, getInitialValues, getTestCaseAttributeValue, getTestlet, isGroup, isTestcaseOrGroup, move, setDescription, setInitialValue, setStatus, setTestCaseAttributeValue
-
Methods inherited from interface com.piketec.tpt.api.util.UUIDObject
getUUID
-
-
-
-
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 ApiException, java.rmi.RemoteException
Returns the current status of the scenario.- Returns:
- The current status or
null
if status is "new". - Throws:
ApiException
- If thisScenario
is not a test case.java.rmi.RemoteException
- remote communication problem
-
getStatusHistory
RemoteList<Status> getStatusHistory() throws ApiException, 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:
ApiException
- If thisScenario
is not a test case.java.rmi.RemoteException
- remote communication problem
-
checkForNewRevision
boolean checkForNewRevision() throws ApiException, java.rmi.RemoteException
Returnstrue
if this scenario has been modified since the last status history entry or if it has no revision. Otherwise, returnsfalse
.- Returns:
true
if it is modified or newfalse
if it is up-to-date
- Throws:
ApiException
- If thisScenario
is not a test case.java.rmi.RemoteException
- remote communication problem
-
isStatusOutdated
boolean isStatusOutdated() throws ApiException, java.rmi.RemoteException
Returnstrue
if this scenario is marked as "modified"(=outdated) or has no revision. Otherwise, returnsfalse
.- Returns:
true
if it is outdated or newfalse
if it is up-to-date
- Throws:
ApiException
- If thisScenario
is not a test case.java.rmi.RemoteException
- remote communication problem
-
exportTestSpecification
java.lang.String exportTestSpecification() throws java.rmi.RemoteException
Generates a specification for this scenario including the initial values. This specification can be reimported viaStepListScenario.importTestSpecification(String)
.
Please note that the reimport is not a lossless process, especially when importing a specification that was exported from aDiagramScenario
. Some complex steps cannot be imported and will be replaced with documentation steps (e.g. embedded signal step).- Returns:
- generated test specification
- Throws:
java.rmi.RemoteException
- remote communication problem
-
-