Package com.piketec.tpt.api.diagram
Interface DiagramScenario
-
- All Superinterfaces:
IdentifiableRemote
,NamedObject
,java.rmi.Remote
,Scenario
,ScenarioOrGroup
,TptRemote
,UUIDObject
public interface DiagramScenario extends Scenario
ADiagramScenario
is a automaton. It specifies- a path through the automaton given by a set of (active)
Transitions
- a selected Variant (
Scenario
) for each Testlet in the path - a selected
TransitionSpec
for each of the aboveTransitions
In TPT, it represents both the variants as well as the test cases. Create a new
DiagramScenario
viaTestlet.createDiagVariant(String, ScenarioGroup)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addTransitionToPath(Transition t)
RemoteCollection<Transition>
getPath()
TransitionSpec
getSelectedTransitionSpec(Transition transition)
Scenario
getSelectedVariant(Testlet state)
Get the Variant that is currently selected for a given state in thisVariant
ornull
.void
setSelectedTransitionSpec(Transition transition, TransitionSpec transitionSpec)
void
setSelectedVariant(Testlet state, Scenario variant)
StepListScenario
transformToStepList()
Transforms thisDiagramScenario
into an emptyStepListScenario
.-
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.Scenario
checkForNewRevision, exportTestSpecification, getCompileError, getCurrentStatus, getLinkedRequirements, getStatusHistory, getTestDataDirectory, isStatusOutdated
-
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
-
getPath
RemoteCollection<Transition> getPath() throws java.rmi.RemoteException
- Returns:
- The list of all selected
Transitions
for this variant. - Throws:
java.rmi.RemoteException
- remote communication problem
-
addTransitionToPath
void addTransitionToPath(Transition t) throws java.rmi.RemoteException
Add aTransition
to the list of selectedTransitions
for thisDiagramScenario
. ConflictingTransitions
are automatically removed from the list.- Parameters:
t
- TheTransition
to add to the path in the scenario.- Throws:
java.rmi.RemoteException
- If the givenTransition
object is not aRemoteObject
or it does not originate from the TPT instance represented by this API object.
-
getSelectedVariant
Scenario getSelectedVariant(Testlet state) throws java.rmi.RemoteException
Get the Variant that is currently selected for a given state in thisVariant
ornull
.- Parameters:
state
- TheState
, for which the currently selected variant shall be examined.- Returns:
null
if no Variant has been previously selected for thisState
in the current Scenario. The selectedVariant
otherwise.- Throws:
java.rmi.RemoteException
- If the givenState
object is not aRemoteObject
or it does not originate from the TPT instance represented by this API object.
-
setSelectedVariant
void setSelectedVariant(Testlet state, Scenario variant) throws java.rmi.RemoteException
Set a givenVariant
for a givenTestlet
in the currentScenario
. Ifvariant==null
, the currently selected varant will be deleted.- Parameters:
state
- Represents theState
, for which a variant shall be set.variant
- AVariant
to be set ornull
to reset the variant for this state.- Throws:
java.rmi.RemoteException
- If the givenstate
orvariant
objects are not aRemoteObject
or they do not originate from the TPT instance represented by this API object.
-
getSelectedTransitionSpec
TransitionSpec getSelectedTransitionSpec(Transition transition) throws java.rmi.RemoteException
- Parameters:
transition
- TheTransition
, for which theTransitionSpec
shall be examined.- Returns:
- The currently selected
TransitionSpec
ornull
if none has been selected so far. - Throws:
java.rmi.RemoteException
- remote communication problem
-
setSelectedTransitionSpec
void setSelectedTransitionSpec(Transition transition, TransitionSpec transitionSpec) throws java.rmi.RemoteException
- Parameters:
transition
- The Transition, for which the new transition specification shall be set.transitionSpec
- The new transition specification ornull
to select none.- Throws:
java.rmi.RemoteException
- If the giventransition
ortransitionSpec
objects are not aRemoteObject
or they do not originate from the TPT instance represented by this API object.
-
transformToStepList
StepListScenario transformToStepList() throws java.rmi.RemoteException
Transforms thisDiagramScenario
into an emptyStepListScenario
. All contents will be deleted, but the meta data like ids and attributes will be retained. Do not use thisDiagramScenario
afterwards.- Returns:
- This
DiagramScenario
as an emptyStepListScenario
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
-