Execute Method

Applies to TestComplete 15.70, last modified on December 17, 2024

Description

Use this method to run a Selenium, unit, ReadyAPI or SoapUI test to which the ProgObj object provides scripting access.

Declaration

ProgObj.Execute()

ProgObj An expression, variable or parameter that specifies a reference to one of the objects listed in the Applies To section
Result Boolean

Applies To

The method is applied to the following objects:

Result Value

False if TestComplete fails to start the test; True otherwise.

Note: If the test starts successfully, but fails during the run, the method returns True.

Example

The following example runs a unit test.

JavaScript, JScript

function Test()
{
  …
  // Starts the unit test
  SeleniumOrUnitTesting.JUnit1.Execute();
  …
}

Python

def Test():
  SeleniumOrUnitTesting.JUnit1.Execute()

VBScript

Sub Test
  …
  ' Starts the unit test
  SeleniumOrUnitTesting.JUnit1.Execute
  …
End Sub

DelphiScript

procedure Test();
begin
  …
  // Starts the unit test
  SeleniumOrUnitTesting.JUnit1.Execute;
  …
end;

C++Script, C#Script

function Test()
{
  …
  // Starts the unit test
  SeleniumOrUnitTesting["JUnit1"]["Execute"]();
  …
}

See Also

UnitTest Object
SoapUITest Object
Integration With Unit Testing Frameworks
Integration With Selenium
Running ReadyAPI and SoapUI Tests

Highlight search results