Package com.piketec.tpt.api.steplist
Interface StepListScenario
-
- All Superinterfaces:
IdentifiableRemote
,NamedObject
,java.rmi.Remote
,Scenario
,ScenarioOrGroup
,TptRemote
public interface StepListScenario extends Scenario
AStepListScenario
contains a list ofsteps
.In TPT, it represents both the variants as well as the test cases. Create a new
StepListScenario
viaTestlet.createDiagVariant(String, ScenarioGroup)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Step
createStep(int index, java.lang.String type)
Creates a step of a given type at the given position.java.lang.String
exportTestSpecification()
Generates a specification containing the step list and the initial values.RemoteList<Step>
getSteps()
java.lang.String
getUsing()
void
importTestSpecification(java.lang.String specification)
Imports a formatted step list specification into thisStepListScenario
.boolean
isDoAssessment()
Get the value from the do assessment variable for the given scenario.boolean
isReportAlways()
Get the value from the report always variable for this scenario.void
setDoAssessment(boolean active)
Sets the do assessment variable from a step list scenario.void
setReportAlways(boolean active)
Sets the report always variable from a step list scenario.void
setUsing(java.lang.String using)
Set the used namespace(s) for the step list scenario.DiagramScenario
transformToDiagramScenario()
Transforms thisStepListScenario
into aDiagramScenario
without any transitions added to the path.-
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, 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
-
-
-
-
Method Detail
-
getSteps
RemoteList<Step> getSteps() throws java.rmi.RemoteException
- Returns:
- the list of
Steps
in their given order. - Throws:
java.rmi.RemoteException
- remote communication problem
-
createStep
Step createStep(int index, java.lang.String type) throws ApiException, java.rmi.RemoteException
Creates a step of a given type at the given position.- Parameters:
index
- Indicates the position where the new step shall be inserted in the step list represented by this object.type
- The type of the newly created Step as String, look inStep
for possible Strings as a type.- Returns:
- the newly created Step.
- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- if the giventype
does not exist.
-
setDoAssessment
void setDoAssessment(boolean active) throws ApiException, java.rmi.RemoteException
Sets the do assessment variable from a step list scenario. When it is set to true, all the compare steps will be considered during the execution, otherwise they will be ignored. If the variable is set to false, it will also automatically deactivate the report always variable.- Parameters:
active
- true if the do assessment variable should be turned on.- Throws:
ApiException
- if the scenario is not a step list scenariojava.rmi.RemoteException
- remote communication problem
-
isDoAssessment
boolean isDoAssessment() throws java.rmi.RemoteException
Get the value from the do assessment variable for the given scenario.- Returns:
- true if the do assessment variable is on, otherwise false.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
setReportAlways
void setReportAlways(boolean active) throws ApiException, java.rmi.RemoteException
Sets the report always variable from a step list scenario. When it is set to true, all the compare step results will appear in the report, otherwise they will be ignored. If this variable is set to true, it will also automatically activate the do assessment variable.- Parameters:
active
- true if the report always variable should be turned on.- Throws:
ApiException
- If the scenario is not a step list scenariojava.rmi.RemoteException
- remote communication problem
-
isReportAlways
boolean isReportAlways() throws java.rmi.RemoteException
Get the value from the report always variable for this scenario.- Returns:
- true if the report always variable is on, otherwise false.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
getUsing
java.lang.String getUsing() throws java.rmi.RemoteException
- Returns:
- A comma separated list of the used namespaces for the step list scenario.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
setUsing
void setUsing(java.lang.String using) throws java.rmi.RemoteException
Set the used namespace(s) for the step list scenario. For more namespaces provide a comma separated list.- Parameters:
using
- The new namespace(s) that shall be used.- Throws:
java.rmi.RemoteException
- remote communication problem
-
transformToDiagramScenario
DiagramScenario transformToDiagramScenario() throws java.rmi.RemoteException
Transforms thisStepListScenario
into aDiagramScenario
without any transitions added to the path. All contents will be deleted, but the meta data like ids and attributes will be retained. Do not use thisStepListScenario
afterwards.- Returns:
- This
StepListScenario
as an emptyDiagramScenario
. - Throws:
java.rmi.RemoteException
- remote communication problem
-
exportTestSpecification
java.lang.String exportTestSpecification() throws java.rmi.RemoteException
Generates a specification containing the step list and the initial values. This specification can be reimported viaimportTestSpecification(String)
.
Please note that some complex steps cannot be imported and will be imported as documentation steps (e.g. embedded signal step) or will be unrolled (e.g. table step).- Returns:
- generated test specification for this step list.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
importTestSpecification
void importTestSpecification(java.lang.String specification) throws java.rmi.RemoteException
Imports a formatted step list specification into thisStepListScenario
. This method imports initial values and appends all steps to the existing definitions.
Please note that some complex steps cannot be imported and will be imported as documentation steps (e.g. embedded signal step) or will be unrolled (e.g. table step).- Parameters:
specification
- The sepcification as formatted plain text, e.g.
Initialize myVar to 17
Set myVar to myVar+1 // myComment
Ramp myParam to 1 with 2/s- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
exportTestSpecification()
-
-