StepID Property

Applies to TestComplete 15.0, last modified on November 17, 2021
The manual testing functionality is deprecated. Do not use it for creating new tests. It will be removed in a future TestComplete release.

Description

Use this property to obtain the identifier of a manual test step that was generated by a manual testing event. Step identifiers are shown in the ID field of the Manual Testing editor.

Declaration

ManualTestingStepEventParamsObj.StepID

Read-Only Property String
ManualTestingStepEventParamsObj An expression, variable or parameter that specifies a reference to a ManualTestingStepEventParams object

Applies To

The property is applied to the following object:

Property Value

The string that holds the step identifier.

Example

The following code snippet is an event handler for the OnStepFail event. When a manual test step fails, the code gets the ManualTestingStepEventParams object, obtains the ID of the failed step and specifies what actions should be performed.

JavaScript, JScript

function GeneralEvents_OnStepFail(Sender, StepParams)
{
  // Obtains the step ID
  var ID = StepParams.StepID;

  // Specifies the actions to be performed
  switch (ID)
  {
    case "STEP_L":
          StepParams.StepActions = ManualTests.mtsaRetry // Execute the test step once again
          break;
    case "STEP_M":
          StepParams.StepActions = ManualTests.mtsaSkip // Skip the current test step
          break;
    case "STEP_N":
          StepParams.StepActions = ManualTests.mtsaStop // Stop the test execution
          break;
  }

}

Python

def GeneralEvents_OnStepFail(Sender, StepParams):
  # Obtains the step ID 
  ID = StepParams.StepID # Specifies the actions to be performed
  if ID == "STEP_L":
    StepParams.StepActions = ManualTests.mtsaRetry 
    # Execute the test step once again
  elif ID == "STEP_M":
    StepParams.StepActions = ManualTests.mtsaSkip
    # Skip the current test step
  elif ID == "STEP_N":
    StepParams.StepActions = ManualTests.mtsaStop 
    # Stop the test execution

VBScript

Sub GeneralEvents_OnStepFail(Sender, StepParams)

  ' Obtains the step ID
  ID = StepParams.StepID

  ' Specifies the actions to be performed
  Select Case ID
    Case "STEP_L" StepParams.StepActions = ManualTests.mtsaRetry ' Execute the test step once again
    Case "STEP_M" StepParams.StepActions = ManualTests.mtsaSkip ' Skip the current test step
    Case "STEP_N" StepParams.StepActions = ManualTests.mtsaStop ' Stop the test execution
  End Select

End Sub

DelphiScript

procedure GeneralEvents_OnStepFail(Sender, StepParams);
var ID;
begin
  // Obtains the step ID
  ID := StepParams.StepID;

  // Specifies the actions to be performed
  case ID of
    'STEP_L' : StepParams.StepActions := ManualTests.mtsaRetry; // Execute the test step once again
    'STEP_M' : StepParams.StepActions := ManualTests.mtsaSkip; // Skip the current test step
    'STEP_N' : StepParams.StepActions := ManualTests.mtsaStop; // Stop the test execution
  end;

end;

C++Script, C#Script

function GeneralEvents_OnStepFail(Sender, StepParams)
{
  // Obtains the step ID
  var ID = StepParams["StepID"];

  // Specifies the actions to be performed
  switch (ID)
  {
    case "STEP_L":
          StepParams["StepActions"] = ManualTests.mtsaRetry // Execute the test step once again
          break;
    case "STEP_M":
          StepParams["StepActions"] = ManualTests.mtsaSkip // Skip the current test step
          break;
    case "STEP_N":
          StepParams["StepActions"] = ManualTests.mtsaStop // Stop the test execution
          break;
  }

}

See Also

Manual Testing
Executing Manual Tests
About Manual Test Editor
Manual Testing Events

Highlight search results