Configuring basic HTTP(S) requests to target endpoints using Dotcom-Monitor tools does not require deep knowledge in software development and testing. Dotcom-Monitor has a friendly graphical user interface that allows users to create an HTTP(S) request in couple of minutes. However, if you need to configure a chain of requests (for example, to go through modern authentication processes), add parametrization, push dynamic payload along with requests, etc., you may face some challenges.
To facilitate the process of setting up HTTP(S) web monitoring and load testing with Dotcom-Monitor, please review this guide. In this guide you will find additional links to related Dotcom-Monitor Knowledge Base articles with detailed descriptions of the most challenging steps in configuring HTTP(S) requests.
How to Create a Chain of Requests
Dotcom-Monitor allows users to send several HTTP(S) requests in a serial order and use values extracted from the received responses in the subsequent requests. For example, you may want to test not only one endpoint of your RESTful API, but also to validate the full API functionality by executing all test API calls in succession. To do this, you need to set up a chain of requests to target endpoints within one HTTP(S) device.
Learn more:
How to Set Up Token-based Authentication Requests
Token-based authentication methods are commonly used to secure data in modern APIs. In this method, an authentication token is provided to a client upon login and required every time the client sends a request to the system. To test APIs that require token-based authentication, you need to pass a bearer token returned in a login response with an authorization header of another HTTP(S) request.
Learn more:
How to Parametrize Your Requests
In some cases, you may need to send requests that have parameters with a predefined set of values or replace the parameter values with generated data (e.g., to pass a unique GUID along with requests). Furthermore, you may want to use a parameter value from one request to send along with another request. By default, Dotcom-Monitor uses the parameter values set upon the request configuration. Thus, all the requests that are sent to a target endpoint are identical. To change the HTTP(S) request parameters dynamically, you need to parametrize your request.
To support request parametrization, Context Parameters are used in HTTP(S) requests in Dotcom-Monitor. Request parameters (URL, header fields, form fields, and “raw” POST data) can be converted to context parameters in the HTTP(S) request settings.
Learn more:
- How to Use Context Parameters in HTTP(S) Requests
- Setting Up Dynamic Variables for HTTP(S) Load Test
- How to Work with Postman Environment Variables
How to Push Dynamic Payload: Guide to Using Razor Expressions and Data Masks
Dotcom-Monitor supports using Data Masks and Razor expressions in the request body to dynamically change HTTP(S) payload.
Learn more:
How to Modify Payload and Track Custom Information in Responses
Dotcom-monitor allows you to add scripts to HTTP(S) requests. Using scripts allows you to dynamically change the request parameter values, pass data between requests within the device, create pre-request and post-request test scenarios. Prepare Script code is executed before sending the request and code added to Post Script is executed after the response is received by Dotcom-Monitor.
Learn more: