ManualTestingStepEventParams Object

Applies to TestComplete 15.63, last modified on April 10, 2024
The manual testing functionality is deprecated. Do not use it for creating new tests. It will be removed in a future TestComplete release.

Description

The ManualTestingStepEventParams object is used within manual testing event handlers: OnBeforeStep, OnStepFail, OnStepSuccess and OnTestStop. According to the event, the object provides information about the step that will be executed or that has just been executed.

Members

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