![]() |
The manual testing functionality is deprecated but still available in TestComplete. While we recommend using other approaches for new tests, you can continue to create and run manual tests if needed.. |
Description
Use this method to add a new substep to the step that corresponds to the ManualTestStepObj object.
Declaration
ManualTestStepObj.AddSubstep()
ManualTestStepObj | An expression, variable or parameter that specifies a reference to a ManualTestStep object | |||
Result | A ManualTestStep object |
Applies To
The method is applied to the following object:
Result Value
The method returns the ManualTestStep
object that corresponds to the added substep.
Example
The following code snippet creates a manual test and uses the AddSubstep
method to add a test step to the root step and to add a substep to the added test step.
JavaScript, JScript
function ManualTest()
{
var RootStep, SubStep;
// Clears the test properties
ManualTestBuilder.Reset();
// Specifies the test name
ManualTestBuilder.Name = "NewManualTest";
// Obtains the root step of the manual test and specifies its properties
RootStep = ManualTestBuilder.Root;
...
// Adds test steps to the root step
TestStep = RootStep.AddSubstep();
...
// Adds a substep to the test step
SubStep = TestStep.AddSubstep();
...
// Saves the test to a file
ManualTestBuilder.Save("C:\\Work Folder\\ManualTest\\", false);
}
{
var RootStep, SubStep;
// Clears the test properties
ManualTestBuilder.Reset();
// Specifies the test name
ManualTestBuilder.Name = "NewManualTest";
// Obtains the root step of the manual test and specifies its properties
RootStep = ManualTestBuilder.Root;
...
// Adds test steps to the root step
TestStep = RootStep.AddSubstep();
...
// Adds a substep to the test step
SubStep = TestStep.AddSubstep();
...
// Saves the test to a file
ManualTestBuilder.Save("C:\\Work Folder\\ManualTest\\", false);
}
Python
def ManualTest():
# Clears the test properties
ManualTestBuilder.Reset()
# Specifies the test name
ManualTestBuilder.Name = "NewManualTest";
# Obtains the root step of the manual test and specifies its properties
RootStep = ManualTestBuilder.Root;
# Adds test steps to the root step
TestStep = RootStep.AddSubstep()
# Adds a substep to the test step
SubStep = TestStep.AddSubstep()
# Saves the test to a file
ManualTestBuilder.Save("C:\\Work Folder\\ManualTest\\", False)
VBScript
Sub ManualTest
' Clears the test properties
ManualTestBuilder.Reset
' Specifies the test name
ManualTestBuilder.Name = "NewManualTest"
' Obtains the root step of the manual test and specifies its properties
Set RootStep = ManualTestBuilder.Root
...
' Adds test steps to the root step
Set TestStep = RootStep.AddSubstep
...
' Adds a substep to the test step
Set SubStep = TestStep.AddSubstep
...
' Saves the test to a file
Call ManualTestBuilder.Save("C:\Work Folder\ManualTest\", False)
End Sub
' Clears the test properties
ManualTestBuilder.Reset
' Specifies the test name
ManualTestBuilder.Name = "NewManualTest"
' Obtains the root step of the manual test and specifies its properties
Set RootStep = ManualTestBuilder.Root
...
' Adds test steps to the root step
Set TestStep = RootStep.AddSubstep
...
' Adds a substep to the test step
Set SubStep = TestStep.AddSubstep
...
' Saves the test to a file
Call ManualTestBuilder.Save("C:\Work Folder\ManualTest\", False)
End Sub
DelphiScript
procedure ManualTest();
var RootStep, SubStep;
begin
// Clears the test properties
ManualTestBuilder.Reset;
// Specifies the test name
ManualTestBuilder.Name := 'NewManualTest';
// Obtains the root step of the manual test and specifies its properties
RootStep := ManualTestBuilder.Root;
...
// Adds test steps to the root step
TestStep := RootStep.AddSubstep;
...
// Adds a substep to the test step
SubStep := TestStep.AddSubstep;
...
// Saves the test to a file
ManualTestBuilder.Save('C:\Work Folder\ManualTest\', false);
end;
var RootStep, SubStep;
begin
// Clears the test properties
ManualTestBuilder.Reset;
// Specifies the test name
ManualTestBuilder.Name := 'NewManualTest';
// Obtains the root step of the manual test and specifies its properties
RootStep := ManualTestBuilder.Root;
...
// Adds test steps to the root step
TestStep := RootStep.AddSubstep;
...
// Adds a substep to the test step
SubStep := TestStep.AddSubstep;
...
// Saves the test to a file
ManualTestBuilder.Save('C:\Work Folder\ManualTest\', false);
end;
C++Script, C#Script
function ManualTest()
{
var RootStep, SubStep;
// Clears the test properties
ManualTestBuilder["Reset"]();
// Specifies the test name
ManualTestBuilder["Name"] = "NewManualTest";
// Obtains the root step of the manual test and specifies its properties
RootStep = ManualTestBuilder["Root"];
...
// Adds test steps to the root step
TestStep = RootStep["AddSubstep"]();
...
// Adds a substep to the test step
SubStep = TestStep["AddSubstep"]();
...
// Saves the test to a file
ManualTestBuilder["Save"]("C:\\Work Folder\\ManualTest\\", false);
}
{
var RootStep, SubStep;
// Clears the test properties
ManualTestBuilder["Reset"]();
// Specifies the test name
ManualTestBuilder["Name"] = "NewManualTest";
// Obtains the root step of the manual test and specifies its properties
RootStep = ManualTestBuilder["Root"];
...
// Adds test steps to the root step
TestStep = RootStep["AddSubstep"]();
...
// Adds a substep to the test step
SubStep = TestStep["AddSubstep"]();
...
// Saves the test to a file
ManualTestBuilder["Save"]("C:\\Work Folder\\ManualTest\\", false);
}