TsKeyword¶
- class TsKeyword¶
keyword test step
Returned by
- AddActivityArgument()¶
Convenience-Method for activity argument creation.
- Returns:
Activity argument of this test step.
- Return type:
- AddActivityReturn()¶
Convenience-Method for activity return creation.
- Returns:
Activity return of this test step
- Return type:
- AddArgument(identifier)¶
Adds the argument with the given identifier to the keyword test step. Creates a new argument if no such argument exists.
- Parameters:
- identifier : str¶
Identifier of argument. Has to match the identifier of an existing argument of the keyword.
- Returns:
Argument of this test step whose identifier is ‘identifier’.
- Return type:
- Raises:
ApiError – If identifier is None or an empty string
- AddComponentArgument()¶
Convenience-Method for component creation.
- Returns:
Component argument of this test step.
- Return type:
- AddDesiredActivityReturn()¶
Convenience-Method for creation of desired activity in “establish” keyword test steps.
- Returns:
Return of this test step whose name is ‘identifier’
- Return type:
- AddReturn(identifier)¶
Adds the return with the given identifier to the keyword test step. Creates a new return if no such return already exists.
Keyword test steps are limited to one return value!
- Parameters:
- identifier : str¶
Identifier of the return. Has to match the identifier of an existing return of the keyword.
- Returns:
Return of this test step whose identifier is ‘identifier’
- Return type:
- Raises:
ApiError – If identifier is None or an empty string
- Clone()¶
Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.
- Returns:
A copy of this object
- Return type:
- DeactivateFailedComment()¶
Deactivates the expectation for the failed comment so that the result will not be evaluated.
- DeactivateSuccessComment()¶
Deactivates the expectation for the success comment so that the result will not be evaluated.
- DeactivateTimeOption()¶
Deactivates any time option set on the test step. This is equivalent to selecting the option “none” in the test step’s time options menu.
- DeleteTranslatedCommentText(language)¶
Deletes a comment for the test step in the given language.
- Parameters:
- language : str¶
Language of the text (‘en_US’, ‘de_DE’, ‘zh_CN’)
- GetActionColumnText()¶
Returns the text value of the “action” column.
- Returns:
Action column text
- Return type:
str
- GetActiveTimeOptionType()¶
Returns the type of the currently active time option.
- Returns:
Type of active time option (“Timeless”, “Finally”, “TrueForWithin”, “Generally”, “SyncOnly”, “PollingCycleMultiplier”)
- Return type:
string
- GetArgument(identifier)¶
Gets the argument with the given identifier of the keyword test step.
- Parameters:
- identifier : str¶
Identifier of argument. Has to match the identifier of an existing argument of the keyword.
- Returns:
Argument of this test step whose identifier matches ‘identifier’ or None if there is no argument with this identifier.
- Return type:
- Raises:
ApiError – If identifier is None or an empty string
- GetArguments()¶
Returns all argument of the keyword test step.
- Returns:
List of arguments of this test step.
- Return type:
list[
TsKeywordArgument]
- GetComment()¶
Returns the comment of the test step in the current test case language.
- Returns:
Comment text as shown in the comment tab
- Return type:
str
- GetCommentColumnText()¶
Returns the text value of the “comment” column.
- Returns:
Comment column text
- Return type:
str
- GetError()¶
Returns a list of errors. Note that the error messages depend on the program language ecu.test is set to. Because of that we do not recommend to check against exact error messages, unless you are certain about the respective program language.
- Returns:
List of errors
- Return type:
list[str]
- GetFailedComment()¶
Returns the failed comment of the step.
- Returns:
The failed comment
- Return type:
string
- GetImplementingAnalysisLabel()¶
Returns the analysis label used as implementation for this step.
- Returns:
The requested analysis label or None if no analysis label implementation is used.
- Return type:
str
- GetImplementingTraceStepUuid()¶
Returns the trace analysis (step) UUID used as implementation for this step.
- Returns:
trace anylysis step UUID of the local trace analysis (step) or None if no trace analysis implementation is used.
- Return type:
str
- GetIndex()¶
Returns the zero based index in the parent.
- Returns:
Zero based index
- Return type:
integer
- GetKeywordId()¶
Returns the id of the referenced keyword.
- Returns:
id of the keyword referenced by the test step
- Return type:
int
- GetLineNo()¶
Returns the test steps line number within its test case.
- Returns:
Line number
- Return type:
int
- GetMinimumDuration()¶
Returns the minimum duration of the test step’s time option, if a corresponding option has been set.
- Returns:
The minimum duration, else None
- Return type:
string
- GetMinimumDurationUnit()¶
Returns the unit of the minimum duration of the test step’s time option, if a corresponding option has been set.
- Returns:
The unit of the minimum duration, else None
- Return type:
string
- GetParameterColumnText()¶
Returns the text value of the “parameter” column.
- Returns:
Parameter column text
- Return type:
str
- GetParent()¶
Returns the parent test step.
- Returns:
The parent test step or None if it is a top level test step.
- Return type:
- GetPollingCycle()¶
Returns the polling cycle of the test step’s time option, if a corresponding option has been set.
- Returns:
The polling cycle, else None
- Return type:
string
- GetPollingCycleUnit()¶
Returns the unit of the polling cycle of the test step’s time option, if a corresponding option has been set.
- Returns:
The unit of the polling cycle, else None
- Return type:
string
- GetReturn(identifier)¶
Gets the return with the given identifier of the keyword test step.
- Parameters:
- identifier : str¶
Identifier of the return. Has to match the identifier of an existing return of the keyword.
- Returns:
Return of this test step whose identifier matches ‘identifier’ or None if there is no return with this identifier.
- Return type:
- Raises:
ApiError – If identifier is None or an empty string
- GetReturns()¶
Returns all return values of the keyword test step.
- Returns:
List of returns of this test step.
- Return type:
list[
TsKeywordReturn]
- GetSuccessComment()¶
Returns the success comment of the step.
- Returns:
The success comment
- Return type:
string
- GetTags()¶
Returns the tags set for this step.
- Returns:
A (sorted) list of tags
- Return type:
list[str]
- GetTestManagementId()¶
Returns the test management id of the test step.
- Returns:
Test step id.
- Return type:
str
- GetTestStepId()¶
Returns the test step id.
- Returns:
test step id
- Return type:
str
- GetTimeout()¶
Returns the timeout of the test step’s time option, if a corresponding option has been set.
- Returns:
The timeout else None
- Return type:
string
- GetTimeoutUnit()¶
Returns the unit of the timeout of the test step’s time option, if a corresponding option has been set.
- Returns:
The unit of the timeout else None
- Return type:
string
- GetTranslatedCommentText(language)¶
Returns the text value of the “comment” column in the given language.
- Parameters:
- language : str¶
Language of the requested text (‘en_US’, ‘de_DE’, ‘zh_CN’)
- Returns:
Comment column text
- Return type:
str
- GetType()¶
Returns the type (class name) of the test step, e.g.
“TsPreconditionBlock”
“TsWait”
“TsIfThenElse”
“TsSwitchCase”
“TsCaseNode”
- Returns:
Type (class name) of the test step
- Return type:
str
- GetValueColumnText()¶
Returns the text value of the “value” column in your current test case language.
- Returns:
Value column text
- Return type:
str
- HasAnalysisLabelImplementation()¶
Returns whether the implementation is realized by requesting an analysis label.
- Returns:
True if this step is implemented requesting an analysis label, else False.
- Return type:
boolean
- HasTraceAnalysisImplementation()¶
Returns whether the implementation is realized by a local trace analysis.
- Returns:
True if this step is implemented using trace analysis, else False.
- Return type:
boolean
- IsBreakpoint()¶
Checks whether the test step is a break point.
- Returns:
True if test step is a break point, else False
- Return type:
boolean
- IsContainer()¶
Returns True, if the test step supports calling GetChildren as well as manipulating the structure of its children. (e. g. via inserting or deleting sub test steps).
- Returns:
True if it can contain test steps, else False
- Return type:
boolean
- IsEnabled()¶
Returns the state of the test step.
- Returns:
True if test step is enabled, otherwise False
- Return type:
bool
- IsEstablishTs()¶
Returns whether this test step is an establish test step
- Returns:
True if this is an establish test step, else False
- Return type:
boolean
- IsInPostcondition()¶
Returns True if the test step is located in a postcondition
- Returns:
True if the test step is located in a postcondition, else Flase
- Return type:
bool
- IsInPrecondition()¶
Returns True if the test step is located in a precondition
- Returns:
True if the test step is located in a precondition, else False
- Return type:
bool
- IsOk()¶
Returns the internal state of correctness of the test step.
- Returns:
True if no problems were found, else False
- Return type:
boolean
- IsVisible()¶
Checks whether the test step is visible. This depends on the test step itself or a parent test step being disabled.
- Returns:
True if test step is visible, else False
- Return type:
boolean
- RemoveActivityArgument()¶
Convenience-Method for removing the activity argument.
- Raises:
ApiError – If the activity argument is not part of the test step
- RemoveActivityReturn()¶
Convenience-Method for removing the activity return.
- Raises:
ApiError – If the activity return is not part of the test step
- RemoveArgument(identifier)¶
Removes the argument with the given identifier from the keyword test step.
- Parameters:
- identifier : str¶
Identifier of argument. Has to match the identifier of an existing argument of the keyword.
- Raises:
ApiError – If there is no argument that matches identifier
- RemoveComponentArgument()¶
Convenience-Method for removing the component argument.
- Raises:
ApiError – If the component argument is not part of the test step
- RemoveDesiredActivityReturn()¶
Convenience-Method for removing the desired activity return.
- Raises:
ApiError – If the desired activity return is not part of the test step
- RemoveReturn(identifier)¶
Removes the return with the given identifier from the keyword test step.
- Parameters:
- identifier : str¶
Identifier of the return. Has to match the identifier of an existing return of the keyword.
- Raises:
ApiError – If there is no return that matches identifier
- ResetImplementationType()¶
Resets to package implementation. The implementation will be taken by default from the global mapping file, if defined.
- SetBreakpoint(enable)¶
Sets or unsets the test step to act as a break point.
- Parameters:
- enable : boolean¶
True if test step is a break point, else False
- SetComment(comment)¶
Sets a comment for the test step in the current test case language.
- Parameters:
- comment : str¶
Text to be displayed in the comment tab
-
SetEnabled(state=
True)¶ Enable or disable the test step.
- Parameters:
- state : bool¶
True (Default) to enable, False to disable the test step.
- SetFailedComment(failedComment)¶
Sets the expression for the failed comment of the step. The expression will be activated if it was not enabled previously.
- Parameters:
- failedComment : string¶
The expression for the failed comment
- SetImplementingAnalysisLabel(label)¶
Sets the requested analysis label that must be implemented by an analysis package on project level.
- Attention:
If this option is set, the package must run as stimulation package in a project.
- Parameters:
- label : str¶
The analysis label
- SetImplementingTraceStepUuid(traceStepUuid)¶
Sets the implementing trace analysis (step) by its UUID.
- Parameters:
- traceStepUuid : str¶
trace anylysis step UUID of the local trace analysis (step)
- SetSuccessComment(successComment)¶
Sets the expression for the success comment of the step. The expression will be activated if it was not enabled previously.
- Parameters:
- successComment : string¶
The expression for the success comment
- SetTags(tags)¶
Set the list of tags for this step. The list of tags will be sorted and stored.
- Parameters:
The list of tags
- SetTestManagementId(testManagementId)¶
Sets the test management id of the test step.
- Parameters:
- testManagementId : str¶
Test management id of the test step
-
SetTimeOptionOnlySynchronization(timeout, pollingCycle=
None, timeoutUnit='ms', pollingCycleUnit='ms')¶ Sets the test step’s time option to “only synchronization”.
- SetTimeOptionPollingCycleMultiplier(pollingCycleMultiplier)¶
Sets the test step’s time option to “polling cycle multiplier”. This option must only be used when inserting the test step into a Multi-Check!
- Parameters:
- pollingCycleMultiplier : string¶
The polling cycle multiplier to be used.
-
SetTimeOptionTrueForAtLeast(minimumDuration, pollingCycle=
None, minimumDurationUnit='ms', pollingCycleUnit='ms')¶ Sets the test step’s time option to “true for at least”.
-
SetTimeOptionTrueForAtLeastWithin(minimumDuration, timeout, pollingCycle=
None, timeoutUnit='ms', minimumDurationUnit='ms', pollingCycleUnit='ms')¶ Sets the test step’s time option to “true for at least … within …”.
- Parameters:
- minimumDuration : string¶
The minimum duration to be used
- timeout : string¶
The timeout to be used
- pollingCycle : string¶
Optional polling cycle to be used
- timeoutUnit : string¶
Optional unit for the timeout (ms, s, min, h or d)
- minimumDurationUnit : string¶
Optional unit for the minimum duration (ms, s, min, h or d)
- pollingCycleUnit : string¶
Optional unit for the polling cycle (ms, s, min, h or d)
-
SetTimeOptionWaitUntilTrue(timeout, pollingCycle=
None, timeoutUnit='ms', pollingCycleUnit='ms')¶ Sets the test step’s time option to “wait until true”.