API for Test Steps

Part of the Object based program API.

class TestStepApi

Returned by

CreateTsAddTrace()

Creates an add trace test step.

Returns:

New add trace test step

Return type:

TsAddTrace

CreateTsAgenticMultimedia(mappingItem)

Creates an agentic multimedia test step for the test quantity referenced by the mapping item.

Parameters:
mappingItem

The mapping item pointing to the desired image test quantity

Returns:

New agentic multimedia test step

Return type:

TsAgenticMultimedia

CreateTsAlterPDUTiming(mappingItem)

Creates a new alter PDU timing test step

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New alter PDU timing test step

Return type:

TsAlterPDUTiming

CreateTsAnalysisJob()

Creates an analysis job test step.

Returns:

New analysis job test step

Return type:

TsAnalysisJob

CreateTsAssertion()

Creates an assertion test step.

Returns:

New assertion test step

Return type:

TsAssertion

CreateTsBitExtract()

Creates a bit extract test step. Make sure to add this test step to a parent and set the variable name using SetSaveInVariableName().

Returns:

New bit extract test step

Return type:

TsBitExtract

CreateTsBlock()

Creates a block test step. Other test steps can be added to the block.

Returns:

New block test step

Return type:

TsBlock

CreateTsBreak()

Creates a break test step.

Returns:

New break test step

Return type:

TsBreak

CreateTsBusFirstSignalCheck(mappingItem)

Creates a new check initial value test step

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New check initial value test step

Return type:

TsBusFirstSignalCheck

CreateTsBusFirstSignalReset(mappingItem)

Creates a new reset initial value test step

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New check initial value test step

Return type:

TsBusFirstSignalReset

CreateTsCANoeTestModuleRunner()

Creates a CANoe test module runner test step.

Returns:

New CANoe test module runner test step

Return type:

TsCANoeTestModuleRunner

CreateTsCalculation()

Creates a calculation test step.

Returns:

New calculation test step

Return type:

TsCalculation

CreateTsCall(mappingItem, generateInterface=True, callMode='CALL')

Creates a call test step.

You can pass None for mappingItem if you set generateInterface to False. Otherwise, mappingItem must support a call test step.

The following overview shows the supported call modes for each mapping item type.

Info

DID-specific call modes are not supported for ODX-based diagnostics. Generic diagnostic service mappings support diagnostic databases in ODX and PDX format. OBD-on-UDS service mappings require the builtin OBD database to be activated.

Parameters:
mappingItem

Optional. A mappingItem to assign to the test step

generateInterface : boolean

populate the parameters and return values from the mapping item

callMode : str

Have the test step use this call method. Possible values are:

  • ’CALL’ - actively call the target function (default value, supported for DiagRoutineMappingItem and ServiceMappingItem)

  • ’READ_PARAMS’ - listen to someone else calling the target function and read the input parameters of that call (only supported for ServiceMappingItem)

  • ’READ_RETURNS’ - listen to someone else calling the target function and read the return values of that call (only supported for ServiceMappingItem)

  • ’READ_EVENT’ - read the parameters of the target event for the last time it was sent (only supported for ServiceMappingItem)

  • ’SEND_EVENT’ - send the target event with the specified parameters (only supported for ServiceMappingItem)

  • ’[KWP_]SHORT_TERM_ADJUSTMENT’ - temporarily adjust the value of a DID (only supported for DiagDidMappingItem)

  • ’KWP_LONG_TERM_ADJUSTMENT’ - adjust the value of a DID (only for KWP2000) (only supported for DiagDidMappingItem)

  • ’[KWP_]FREEZE_CURRENT_STATE’ - freeze the current value of a DID (only supported for DiagDidMappingItem)

  • ’[KWP_]RESET_TO_DEFAULT’ - reset the value of a DID to its default (only supported for DiagDidMappingItem)

  • ’[KWP_]RETURN_CONTROL_TO_ECU’ - release control over the DID value (only supported for DiagDidMappingItem)

  • ’KWP_REPORT_CURRENT_STATE’ - Read the DID value (only for KWP2000) (only supported for DiagDidMappingItem)

  • ’DIAG_SERVICE’ - Call generic Diag Service (only supported for DiagServiceMappingItem)

  • ’OBD_SERVICE’ - Call OBD on UDS Diag Service (only supported for DiagObdOnUdsServiceMappingItem)

  • ’READ’ - read the DID value (only supported for DiagDidMappingItem)

  • ’WRITE’ - write the DID value (only supported for DiagDidMappingItem)

  • ’PROVIDE_METHOD’ - provide a method. Specify the formal return values as parameters (only supported for ServiceMappingItem)

Please note: Some Diag teststeps support UDS as well as KWP2000. To select the KWP2000 option make sure to use the KWP_ prefix.

Returns:

New call test step

Return type:

TsCall

CreateTsCheckSimulationStatus()

Creates a check simulation status test step.

Returns:

New check simulation status test step

Return type:

TsCheckSimulationStatus

CreateTsClearFrameAndSignalBuffers(mappingItem)

Creates a new clear buffers for frame and signals test step

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New clear buffers for frame and signals test step

Return type:

TsClearFrameAndSignalBuffers

CreateTsComment(comment=None)

Creates a comment test step. A comment and an evaluation can be set.

Parameters:
comment : str

Text to be shown as comment

Returns:

New comment test step

Return type:

TsComment

CreateTsContinue()

Creates a continue test step.

Returns:

New continue test step

Return type:

TsContinue

CreateTsEdiabas(mappingItem)

Creates a new ediabas test step

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New ediabas test step

Return type:

TsEdiabas

CreateTsEdiabasLockBlock()

Creates a new ediabas lock block test step

Returns:

New ediabas lock block test step

Return type:

TsEdiabasLockBlock

CreateTsEesError(mappingItem)

Creates a new ees error test step

Parameters:
mappingItem

Mapping item

Returns:

New ees error test step

Return type:

TsEesError

CreateTsEesErrorSet()

Creates a new ees error set test step

Returns:

New ees error set test step

Return type:

TsEesErrorSet

CreateTsExit()

Creates an exit test step.

Returns:

New exit test step

Return type:

TsExit

CreateTsIfDef()

Creates an ifDef test step.

Returns:

New ifDef test step

Return type:

TsIfDef

CreateTsIfThenElse()

Creates an if-then-else test step that executes the contained test steps of the then branch or the else branch depending on the evaluation of the condition.

Returns:

New if-then-else test step

Return type:

TsIfThenElse

CreateTsImageDialog()

Creates a new image dialog test step

Returns:

New image dialog test step

Return type:

TsImageDialog

CreateTsInboxFetch()

Creates an inbox fetch test step. Make sure to add this test step to a parent and set the inbox name using SetInboxName().

Returns:

New inbox fetch test step

Return type:

TsInboxFetch

CreateTsInfoBlock()

Creates a new info block test step

Returns:

New info block test step

Return type:

TsInfoBlock

CreateTsInputDialog()

Creates a new input dialog test step

Returns:

New input dialog test step

Return type:

TsInputDialog

CreateTsJob(mappingItem)

Creates a tool/port job test step.

Parameters:
mappingItem

The mapping item pointing to the desired tool/port job

Returns:

New tool/port job test step

Return type:

TsJob

CreateTsKeywordFromId(id, isEstablishTs=False)

Creates a keyword test step from a keyword id.

Parameters:
id : int

Id to an existing keyword

isEstablishTs : boolean

True if an establish keyword test step shall be created, else False. Default is False.

Returns:

New keyword test step

Return type:

TsKeyword

CreateTsLoadEnvironment()

Creates a load environment test step.

Returns:

New load environment test step

Return type:

TsLoadEnvironment

CreateTsLogFile()

Creates a new log file test step

Returns:

New log file test step

Return type:

TsLogFile

CreateTsLoop()

Creates a loop test step.

Returns:

New loop test step

Return type:

TsLoop

CreateTsMessageDialog()

Creates a new message dialog test step

Returns:

New message dialog test step

Return type:

TsMessageDialog

CreateTsMultiCheck()

Creates a Multi-Check test step

Returns:

New Multi-Check test step

Return type:

TsMultiCheck

CreateTsOutboxPost()

Creates an outbox post test step. Make sure to add this test step to a parent and set the outbox name using SetOutboxName().

Returns:

New outbox fetch test step

Return type:

TsOutboxPost

CreateTsPackageCall(mappingItem)

Creates a package call test step that executes the package referenced in the given mappingItem.

Parameters:
mappingItem

The mapping item referencing the package

Returns:

New package test step

Return type:

TsPackageCall

CreateTsParallelPackageCall(mappingItem)

Creates a package call test step that executes the package referenced in the given mappingItem.

Parameters:
mappingItem

The mapping item referencing the package

Returns:

New package test step

Return type:

TsParallelPackageCall

CreateTsPostconditionBlock()

Creates a postcondition block test step. Other test steps can be added to this block and will be executed as postcondition of the package.

Returns:

New postcondition block test step

Return type:

TsPostconditionBlock

CreateTsPreconditionBlock()

Creates a precondition block test step. Other test steps can be added to this block and will be executed as precondition of the package.

Returns:

New precondition block test step

Return type:

TsPreconditionBlock

CreateTsReactOn()

Creates a react-on test step.

Returns:

New react-on test step

Return type:

TsReactOn

CreateTsRead(mappingItem)

Creates a read test step to read the values of the test quantity that is mapped to the mapping item.

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New read test step

Return type:

TsRead

CreateTsReadAudio(mappingItem)

Create a test step to record audio from the test quantity that is referenced by the mapping item.

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New read audio test step

Return type:

TsReadAudio

CreateTsReadBusSignalGroup(mappingItem, generateInterface=True)

Creates a new bus signal group read test step.

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

generateInterface : boolean

True if parameters and return should be added automatically based on the current testbench configuration

Returns:

New bus signal group read test step

Return type:

TsReadBusSignalGroup

CreateTsReadByReference(referenceName=None)

Creates a read test step that resolves the test quantity by its reference name at runtime.

Parameters:
referenceName : str

Optional. Name of the referenced mapping item

Returns:

New read test step

Return type:

TsReadByReference

CreateTsReadFaultMemory(mappingItem, subfunction='ReportDTCByStatusMask')

Creates a new read fault memory test step.

Supported Subfunctions:

  • ReportDTCByStatusMask

  • ReportMirrorMemoryDTCByStatusMask

  • ReportEmissionsOBDDTCByStatusMask

  • ReportUserDefMemoryDTCByStatusMask

  • ReportSupportedDTCs

  • ReportFirstTestFailedDTC

  • ReportFirstConfirmedDTC

  • ReportMostRecentTestFailedDTC

  • ReportMostRecentConfirmedDTC

  • ReportDTCWithPermanentStatus

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

subfunction : str

Optional. The subfunction that should be executed.

Returns:

New read fault memory test step

Return type:

TsReadFaultMemory

CreateTsReadImage(mappingItem)

Creates a test step to read the image of the test quantity that is mapped to the mapping item.

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New read image test step

Return type:

TsReadImage

CreateTsRepeatUntil()

Creates a RepeatUntilSUCCESS test step.

Returns:

New RepeatUntilSUCCESS test step

Return type:

TsRepeatUntil

CreateTsReport()

Creates a new report test step

Returns:

New report test step

Return type:

TsReport

CreateTsRequestAnalysis()

Creates a request analysis test step.

Returns:

New request analysis test step

Return type:

TsRequestAnalysis

CreateTsResetPDUTiming(mappingItem)

Creates a new reset PDU timing test step

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New reset PDU timing test step

Return type:

TsResetPDUTiming

CreateTsRestore(mappingItem)

Creates a restore test step to set the values of the test quantity that is mapped to the mapping item to the value it had when test execution started

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New restore test step

Return type:

TsRestore

CreateTsReturn()

Creates a return test step.

Returns:

New return test step

Return type:

TsReturn

CreateTsSelectList()

Creates a new select list test step

Returns:

New select list test step

Return type:

TsSelectList

CreateTsSetTraceComment()

Creates a set trace comment test step.

Returns:

New set trace comment test step

Return type:

TsSetTraceComment

CreateTsSimulate()

Creates a new simulate test step

Returns:

New simulate test step

Return type:

TsSimulate

CreateTsStartSimulation()

Creates a start simulation test step.

Returns:

New start simulation test step

Return type:

TsStartSimulation

CreateTsStartStimulus()

Creates a start stimulus test step.

Returns:

New start stimulus test step

Return type:

TsStartStimulus

CreateTsStartTrace()

Creates a start trace test step.

Returns:

New start trace test step

Return type:

TsStartTrace

CreateTsStimulate(mappingItem)

Creates a stimulus test step to stimulate the test quantity that is mapped to the mapping item.

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New stimulate test step

Return type:

TsStimulate

CreateTsStopOfferService(mappingItem)

Creates a suspend/resume offer test step.

Parameters:
mappingItem

Optional. A mappingItem to assign to the test step

Returns:

New suspend/resume offer test step

Return type:

TsStopOfferService

CreateTsStopSimulation()

Creates a stop simulation test step.

Returns:

New stop simulation test step

Return type:

TsStopSimulation

CreateTsStopStimulus()

Creates a stop stimulus test step.

Returns:

New stop stimulus test step

Return type:

TsStopStimulus

CreateTsStopTrace()

Creates a stop trace test step.

Returns:

New stop trace test step

Return type:

TsStopTrace

CreateTsSwitchCase()

Creates a switch-case test step.

Returns:

New switch-case test step

Return type:

TsSwitchCase

CreateTsSwitchDefCase()

Creates a switchdef-case test step.

Returns:

New switchdef-case test step

Return type:

TsSwitchDefCase

CreateTsToDo()

Creates a ToDo test step that can be used to mark that something is still to do here.

Returns:

New ToDo test step

Return type:

TsTodo

CreateTsTouchInput(mappingItem)

Create a test step to perform a touch input on the test quantity referenced by the mapping item.

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New touch input test step

Return type:

TsTouchInput

CreateTsTraceStepResult()

Creates a trace step result test step.

Returns:

New trace step result test step

Return type:

TsTraceStepResult

CreateTsWait()

Creates a wait test step.

Returns:

New wait test step

Return type:

TsWait

CreateTsWaitForUser()

Creates a wait for user test step.

Returns:

New wait for user test step

Return type:

TsWaitForUser

CreateTsWrite(mappingItem)

Creates a write test step to write values in the test quantity that is mapped to the mapping item.

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New write test step

Return type:

TsWrite

CreateTsWriteAudio(mappingItem)

Create a test step to write audio on the test quantity that is referenced by the mapping item.

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

Returns:

New write audio test step

Return type:

TsWriteAudio

CreateTsWriteBusSignalGroup(mappingItem, generateInterface=True)

Creates a new bus signal group write test step.

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

generateInterface : boolean

True if parameters and return should be added automatically based on the current testbench configuration

Returns:

New bus signal group write test step

Return type:

TsWriteBusSignalGroup

CreateTsWriteBusSignalGroupCyclic(mappingItem, generateInterface=True)

Creates a new bus signal group write cyclic test step.

Parameters:
mappingItem

The mapping item pointing to the desired test quantity

generateInterface : boolean

True if parameters and return should be added automatically based on the current testbench configuration

Returns:

New bus signal group write cyclic test step

Return type:

TsWriteBusSignalGroupCyclic

CreateTsWriteByReference(referenceName=None)

Creates a write test step that resolves the test quantity by its reference name at runtime.

Parameters:
referenceName : str

Optional. Name of the referenced mapping item

Returns:

New write test step

Return type:

TsWriteByReference

GetChanges(oldTestStep, newTestStep)

Get the changes that exist between two given test steps. :param oldTestStep: The original test step :type oldTestStep: TestStep :param newTestStep: The modified test step :type newTestStep: TestStep

Returns:

The changes that exist between the two test steps.

Return type:

list[Change]

CreateTsPackage(pkgPath, packageLibraryAlias=None, libraryNamespace=None)

Creates a package call test step that executes the referenced package. Convenience method, so that a package call can be created in one step.

Parameters:
pkgPath : string

Relative path of the package to be called.

packageLibraryAlias : string

Package library alias, if applicable

libraryNamespace : string

Workspace library namespace, if applicable

Returns:

New package test step

Return type:

TsPackageCall

Deprecated since version 2023.3: Please use CreateTsPackageCall instead. See MappingApi.CreatePackageMappingItem for creating a package mapping item.