polyspace.project.ScriptedTestStep Class
Namespace: polyspace.project
Description
This Python® class contains information about a scripted test step that you author using the Polyspace® Test™ Python API. This class includes:
The body of the step that contains the code this step executes
Inputs supplied to the step body
Step observables
Assessments against which the success of the test is evaluated
Note
You can only assign strings to the Value property of an input, assessment, or observable. Therefore, put quotes around the values you want to assign. For example:
To specify the integer
42, assign the string"42"to theValueproperty.To specify the double
3.14, assign the string"3.14"to theValueproperty.To specify the string
"My String", assign the string""My String""to theValueproperty.To specify the address of a variable
var, assign the string"&var"to theValueproperty.
When generating code for your tests, Polyspace Test uses the content of the string to reconstruct the value of the input, assessment, or observable.
Creation
Syntax
Description
scriptedStep = testCase.TestSteps.createScripted(
creates a scripted test step with name stepName)stepName in a polyspace.project.TestCase or polyspace.project.OwnedTestCase object testCase.
scriptedStep = testCase.TestSteps.createFrom(
creates a scripted test step with name existingScriptedStep, stepName)newName by copying an existing
scripted test step existingScriptedStep.
Input Arguments
Properties
Version History
Introduced in R2025a