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:
- 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:
- 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:
- CreateTsAnalysisJob()¶
Creates an analysis job test step.
- Returns:
New analysis job test step
- Return type:
- CreateTsAssertion()¶
Creates an assertion test step.
- Returns:
New assertion test step
- Return type:
- 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:
- CreateTsBlock()¶
Creates a block test step. Other test steps can be added to the block.
- Returns:
New block test step
- Return type:
- 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:
- 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:
- CreateTsCANoeTestModuleRunner()¶
Creates a CANoe test module runner test step.
- Returns:
New CANoe test module runner test step
- Return type:
- CreateTsCalculation()¶
Creates a calculation test step.
- Returns:
New calculation test step
- Return type:
-
CreateTsCall(mappingItem, generateInterface=
True, callMode='CALL')¶ Creates a call test step.
You can pass
NoneformappingItemif you setgenerateInterfacetoFalse. Otherwise,mappingItemmust support a call test step.The following overview shows the supported call modes for each mapping item type.
DiagRoutineMappingItem:~ApiClient.CALLServiceMappingItem:~ApiClient.CALL,~ApiClient.READ_PARAMS,~ApiClient.READ_RETURNS,~ApiClient.READ_EVENT,~ApiClient.SEND_EVENT,~ApiClient.PROVIDE_METHODDiagDidMappingItem:~ApiClient.READ,~ApiClient.WRITE, all DID-specific modes listed belowDiagServiceMappingItem:~ApiClient.DIAG_SERVICEDiagObdOnUdsServiceMappingItem:~ApiClient.OBD_SERVICE
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
DiagRoutineMappingItemandServiceMappingItem)’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:
- CreateTsCheckSimulationStatus()¶
Creates a check simulation status test step.
- Returns:
New check simulation status test step
- Return type:
- 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:
- CreateTsContinue()¶
Creates a continue test step.
- Returns:
New continue test step
- Return type:
- CreateTsEdiabas(mappingItem)¶
Creates a new ediabas test step
- CreateTsEdiabasLockBlock()¶
Creates a new ediabas lock block test step
- Returns:
New ediabas lock block test step
- Return type:
- CreateTsEesError(mappingItem)¶
Creates a new ees error test step
- Parameters:
- mappingItem¶
Mapping item
- Returns:
New ees error test step
- Return type:
- CreateTsEesErrorSet()¶
Creates a new ees error set test step
- Returns:
New ees error set test step
- Return type:
- 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:
- CreateTsImageDialog()¶
Creates a new image dialog test step
- Returns:
New image dialog test step
- Return type:
- 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:
- CreateTsInfoBlock()¶
Creates a new info block test step
- Returns:
New info block test step
- Return type:
- CreateTsInputDialog()¶
Creates a new input dialog test step
- Returns:
New input dialog test step
- Return type:
- CreateTsJob(mappingItem)¶
Creates a tool/port job test step.
-
CreateTsKeywordFromId(id, isEstablishTs=
False)¶ Creates a keyword test step from a keyword id.
- CreateTsLoadEnvironment()¶
Creates a load environment test step.
- Returns:
New load environment test step
- Return type:
- CreateTsLogFile()¶
Creates a new log file test step
- Returns:
New log file test step
- Return type:
- CreateTsMessageDialog()¶
Creates a new message dialog test step
- Returns:
New message dialog test step
- Return type:
- CreateTsMultiCheck()¶
Creates a Multi-Check test step
- Returns:
New Multi-Check test step
- Return type:
- 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:
- 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:
- 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:
- 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:
- 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:
- CreateTsReactOn()¶
Creates a react-on test step.
- Returns:
New react-on test step
- Return type:
- CreateTsRead(mappingItem)¶
Creates a read test step to read the values of the test quantity that is mapped to the mapping item.
- 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:
-
CreateTsReadBusSignalGroup(mappingItem, generateInterface=
True)¶ Creates a new bus signal group read test step.
- Parameters:
- Returns:
New bus signal group read test step
- Return type:
-
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:
-
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:
- Returns:
New read fault memory test step
- Return type:
- 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:
- CreateTsRepeatUntil()¶
Creates a RepeatUntilSUCCESS test step.
- Returns:
New RepeatUntilSUCCESS test step
- Return type:
- CreateTsReport()¶
Creates a new report test step
- Returns:
New report test step
- Return type:
- CreateTsRequestAnalysis()¶
Creates a request analysis test step.
- Returns:
New request analysis test step
- Return type:
- 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:
- 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
- CreateTsSelectList()¶
Creates a new select list test step
- Returns:
New select list test step
- Return type:
- CreateTsSetTraceComment()¶
Creates a set trace comment test step.
- Returns:
New set trace comment test step
- Return type:
- CreateTsSimulate()¶
Creates a new simulate test step
- Returns:
New simulate test step
- Return type:
- CreateTsStartSimulation()¶
Creates a start simulation test step.
- Returns:
New start simulation test step
- Return type:
- CreateTsStartStimulus()¶
Creates a start stimulus test step.
- Returns:
New start stimulus test step
- Return type:
- CreateTsStartTrace()¶
Creates a start trace test step.
- Returns:
New start trace test step
- Return type:
- 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:
- 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:
- CreateTsStopSimulation()¶
Creates a stop simulation test step.
- Returns:
New stop simulation test step
- Return type:
- CreateTsStopStimulus()¶
Creates a stop stimulus test step.
- Returns:
New stop stimulus test step
- Return type:
- CreateTsStopTrace()¶
Creates a stop trace test step.
- Returns:
New stop trace test step
- Return type:
- CreateTsSwitchCase()¶
Creates a switch-case test step.
- Returns:
New switch-case test step
- Return type:
- CreateTsSwitchDefCase()¶
Creates a switchdef-case test step.
- Returns:
New switchdef-case test step
- Return type:
- 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:
- 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:
- CreateTsTraceStepResult()¶
Creates a trace step result test step.
- Returns:
New trace step result test step
- Return type:
- CreateTsWaitForUser()¶
Creates a wait for user test step.
- Returns:
New wait for user test step
- Return type:
- CreateTsWrite(mappingItem)¶
Creates a write test step to write values in the test quantity that is mapped to the mapping item.
- 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:
-
CreateTsWriteBusSignalGroup(mappingItem, generateInterface=
True)¶ Creates a new bus signal group write test step.
- Parameters:
- Returns:
New bus signal group write test step
- Return type:
-
CreateTsWriteBusSignalGroupCyclic(mappingItem, generateInterface=
True)¶ Creates a new bus signal group write cyclic test step.
- Parameters:
- Returns:
New bus signal group write cyclic test step
- Return type:
-
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:
- 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:
- Returns:
New package test step
- Return type:
Deprecated since version 2023.3: Please use
CreateTsPackageCallinstead. SeeMappingApi.CreatePackageMappingItemfor creating a package mapping item.