OnStartTestCase Event

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

Occurs when TestComplete starts a test case.

Declaration

OnStartTestCase(SenderStartTestCaseParams) Parameters
Sender [in] Required Variant
StartTestCaseParams [in] Required A StartTestCaseParams object

Description

The OnStartTestCase event occurs when TestComplete starts a test case:

  • When a project test item marked as a test case starts running (regardless of whether you run individual test items or the entire project).
  • When you run an arbitrary part of script code marked as a test case by using the aqTestCase.Begin and aqTestCase.End methods.
  • When you run a BDD scenario or a feature, or any test specified via tags.

You can create an OnStartTestCase event handler to perform the desired actions after the test case starts, for example, to set the initial conditions for the test case.

Parameters

The event has the following parameters:

Sender

The Event control that processes the event.

StartTestCaseParams

The Name property of the StartTestCaseParams object holds the name of the running test case.

Remarks

For information on how to create an event handler for this and other TestComplete events, see Handling Events.

See Also

OnStopTestCase Event
Handling Events
Event Control

Highlight search results