Open a window for writing custom code

Relevant for: API testing only

When creating or editing a test, you can use event handlers to test non-standard behavior of your application's API. For non-custom code activities, the default event handlers include events for checkpoints, before step execution, and after step execution.

Open the Events tab

  1. In the canvas, select an activity.

  2. In the Properties pane, open the Events tab .

    Note: You can also open the Events tab by double-clicking a Custom Code activity in the canvas.

Back to top

Select an event

In the Handler column, double-click the row for the event to which you want to provide code.

The TestUserCode.cs file opens as a separate tab.

Back to top

Edit the code

In the TestUserCode.cs tab, locate the TODO section for your event handler and add your custom code.

Note: Changes you make in the canvas are not reflected in the event handler code Intellisense/autocomplete options until you save the document.

Back to top