Creating a basic web services test

You can use Dynatrace monitoring solutions to test your web services. Browser agents provide a limited amount of support for monitoring web services through the HTTP Request feature.

The HTTP action enables you to define and specify the necessary requests the test should make. It works well with tests making static API calls.

These steps create a single request script. You can, however, add as many requests as necessary.

In the Recorder, select File > New Script.

This creates a new, empty transaction. The timeline consists of one empty step.

New transaction

To add a new HTTP action HTTP action, hold the mouse pointer over the action separator timeline action separator, then click the plus sign ( + ) that appears and select HTTP from the list.

Add an HTTP action

The HTTP Requests tab for the action is displayed.

HTTP requests tab

Edit the HTTP action.

Click the add icon Add icon to add a row to define the request for the web service call. Select the appropriate method and enter the URL.

Add HTTP request

Click More beside the row to display the Details tab in a popup window.

HTTP request details for POST

If you selected POST for the request, enter the POST content in the Body area.

Add any required headers for the request, if applicable.

After the HTTP action, add a Wait action Wait action.

Configure the Wait action as Wait for Network.

Wait for network configuration

It is important to follow each HTTP action with a Wait for Network action to enable the agent to wait the appropriate amount of time for the request to complete.

For more information, see Wait actions.

Add a Validation action Validate action to match text within the return content to verify the script was successful.

Validate action configuration

This step is not required, but as a best practice, validations should be used throughout a transaction, especially on the final step.