Resume Method

Applies to TestComplete 15.47, last modified on January 20, 2023
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 Resume method reads the data about the state of the suspended manual test and proceeds with the test from the step where it was interrupted.

Declaration

ManualTestingObj.Resume(AClearResumeInfo)

ManualTestingObj An expression, variable or parameter that specifies a reference to a ManualTesting object
AClearResumeInfo [in]    Optional    Boolean Default value: True   
Result None

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

AClearResumeInfo

Specifies whether to clear the data about the state of the suspended manual test after this test has been resumed. You can also delete this data using the ClearResumeInfo method.

Result Value

None.

Remarks

To generate data about the current state of your manual testing, call the Suspend method. To check whether a manual test has this data, use the CanResume method.

When a manual test is resumed its results are posted to a newly created log entry. That is, the results of the resumed test are not appended to the log of the suspended run.

Example

The following code snippet starts executing a manual test. If the test is suspended during the execution, it suggests to resume the testing.

JavaScript, JScript

function Main()
{
  // Clears the resume information
  ManualTests.NewManualTest.ClearResumeInfo();
  // Starts the manual testing
  ManualTests.NewManualTest.Start();

  ...

  while (ManualTests.NewManualTest.CanResume())
  {
    var btnset = mkSet(mbYes, mbNo);
    // Confirms whether to resume the manual testing
    var res = MessageDlg("Manual Testing has been suspended. Resume?", mtConfirmation, btnset, 0);
    if (res == 6)
      // Resumes the manual testing
      ManualTests.NewManualTest.Resume(true);
    else
    {
      Log.Message("You can resume the manual testing later");
      break;
    }
  }

}

Python

def Main():
  # Clears the resume information
  ManualTests.NewManualTest.ClearResumeInfo()
  # Starts the manual testing
  ManualTests.NewManualTest.Start()
  while ManualTests.NewManualTest.CanResume():
    btnset = mkSet(mbYes, mbNo)
    # Confirms whether to resume the manual testing
    res = MessageDlg("Manual Testing has been suspended. Resume?", mtConfirmation, btnset, 0)
    if res == 6:
      # Resumes the manual testing
      ManualTests.NewManualTest.Resume(True)
    else:
      Log.Message("You can resume the manual testing later")
      break

VBScript

Sub Main

  ' Clears the resume information
  ManualTests.NewManualTest.ClearResumeInfo
  ' Starts the manual testing
  ManualTests.NewManualTest.Start

  ...

  Do While ManualTests.NewManualTest.CanResume
    btnset = mkSet(mbYes, mbNo)
    ' Confirms whether to resume the manual testing
    res = MessageDlg("Manual Testing has been suspended. Resume?", mtConfirmation, btnset, 0)
    If res = 6 Then
      ' Resumes the manual testing
      ManualTests.NewManualTest.Resume(True)
    Else
      Log.Message "You can resume the manual testing later"
      Exit Do
    End If
  Loop

End Sub

DelphiScript

procedure Main();
var btnset, res;
begin
  // Clears the resume information
  ManualTests.NewManualTest.ClearResumeInfo;
  // Starts the manual testing
  ManualTests.NewManualTest.Start;

  ...

  while ManualTests.NewManualTest.CanResume do
  begin
    btnset := mkSet(mbYes, mbNo);
    // Confirms whether to resume the manual testing
    res := MessageDlg('Manual Testing has been suspended. Resume?', mtConfirmation, btnset, 0);
    if res = 6 then
      // Resumes the manual testing
      ManualTests.NewManualTest.Resume(true)
    else
    begin
      Log.Message('You can resume the manual testing later');
      break;
    end;
  end;

end;

C++Script, C#Script

function Main()
{
  // Clears the resume information
  ManualTests["NewManualTest"]["ClearResumeInfo"]();
  // Starts the manual testing
  ManualTests["NewManualTest"]["Start"]();

  ...

  while (ManualTests["NewManualTest"]["CanResume"]())
  {
    var btnset = mkSet(mbYes, mbNo);
    // Confirms whether to resume the manual testing
    var res = MessageDlg("Manual Testing has been suspended. Resume?", mtConfirmation, btnset, 0);
    if (res == 6)
      // Resumes the manual testing
      ManualTests["NewManualTest"]["Resume"](true);
    else
    {
      Log["Message"]("You can resume the manual testing later");
      break;
    }
  }

}

See Also

CanResume Method
Suspend Method
Executing Manual Tests

Highlight search results