OnStartTestCase Event

Applies to TestComplete 15.64, last modified on May 16, 2024

Occurs when TestComplete starts a test case.


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


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.


The event has the following parameters:


The Event control that processes the event.


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


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