Web Service event structure

Relevant for: API testing only

When working with a Web service call step or a SOAP Request step, there are a number of additional events available that correspond with the unique run structure of a Web service call:

  • BeforeExecuteStepEvent

  • AfterExecuteStepEvent

  • CodeCheckpointEvent

  • AfterGenerateRequest

  • AfterProcessRequestSecurity

  • AfterProcessRequestAttachments

  • OnSendRequest

  • OnReceiveResponse

  • BeforeProcessResponseAttachments

  • BeforeProcessResponseSecurity

  • BeforeSaveResponse

  • BeforeApplyProtocolSettings

The following diagram shows how each event works within the individual test step run:

Due to the flow and timing of the various events, you should only create event handlers for specific events.

BeforeExecuteStepEvent

Purpose: Set conditions and properties of the step required to make the step run or to handle output from a previous step required in the current step

Accessible Properties:

  • Input properties/parameters from the current activity

  • User/test variables from the current test

  • Output properties from a previous test step or a parent activity

Back to top

AfterExecuteStepEvent

Purpose: Set conditions and properties of the step required to make the step run or to handle output from a previous step required in the current step

Accessible Properties:

  • Input properties/parameters from the current activity

  • User/test variables from the current test

  • Output properties from a previous test step or a parent activity

  • Response data from the current step

  • Response attachments from the current step

Back to top

CodeCheckpointEvent

Purpose: Set conditions and properties of the step required to make the step run or to handle output from a previous step required in the current step

Accessible Properties:

  • Input properties/parameters from the current activity

  • User/test variables from the current test

  • Output properties from a previous test step or a parent activity

  • SOAP Fault properties

Back to top

AfterGenerateRequest

Purpose: Set conditions and properties of the step required to make the step run or to handle output from a previous step required in the current step

Accessible Properties:

  • Input properties from the current step

  • The input envelope from the current step

  • The input attachments from the current step

  • Asynchronous properties from the current step

Back to top

AfterProcessRequestSecurity (WCF services only)

Purpose: Update the request envelope information for Web services using a WCF security scenario with WSE defined. For details on the WCF security scenarios, see Security scenarios.

Use the args.Message property to access the response envelope

Accessible Properties:

  • Input envelope information for the current test.

Back to top

OnReceiveResponse

Purpose: Access the output envelope for the current test for Web services using a Web Service security scenario with WSE defined. For details on the WCF security scenarios, see Security scenarios.

Use the arg.Message property to access the response envelope

Accessible Properties:

  • The response envelope information for the current step. When this runs, the Web service call step returns a byte array containing the response envelope. You must add event handler code also to use the byte array data.

    Use the arg.Message property to access the response envelope

Back to top

BeforeProcessResponseSecurity (WCF Security Scenarios only)

Purpose: Access the output envelope for the current step for Web services using a WCF security scenario with WSE defined. For details on the WCF security scenarios, see Security scenarios.

Use the arg.Message property to access the response.

Accessible Properties:

  • The response envelope information for the current step.

Back to top

BeforeSaveResponse

Purpose: Access the current step's response.

Accessible Properties:

  • The response for the current step. Use the arg.Message property to access the response.

Back to top

See also: