Manually Creating Requests in the User Interface
The most obvious ways to create new requests is by entering them manually through the user interface. Requests are created in the Http Request editor, but you can also edit them live request previewer, which provides a richer syntax highlighted view of the live request data.
A request is made up of:
- A Request Url (full qualified or site relative)
- An Http Verb
- A set of HTTP Headers
- Request Content for POST/PUT requests
You can add a new request by using the icon on the lower request toolbar. The request editor reflects the core request properties:
In addition to Url, Verb, Headers and Content you can also provide a descriptive name to a request that is shown in the request list on the left. The list in the figure shows these descriptive names. If you don't specify one, the raw Url is displayed.
For Request Headers there's also a context menu available that provides you with a quick way to set common headers like Content-Type, Accept and Accept-Encoding with pre-set values.
This context menu is also available in the Request Headers for the Previewer.
Urls can be specified in two ways:
- A fully qualified, absolute Url (ie.
- Site relative, partial Url (ie.
Site relative Urls are very useful and recommended as they make it easy to switch between configurations (dev, staging, production) or different developer configuration Web sites.
For a Site relative Url to work, you need to specify a Site Base Url in the Session configuration. This base Url is then applied to any partial Url to produce a full Url to execute the request.
Note that when you create a new Http Request, it's immediately added to the Session list even before you assign a Url or Name. The session and Session List UI is updated in real time as soon as you make a change and applied immediately to any Request you run individually or in a load test, but changes are not immediately saved to a session file until explicitly saved.
After adding new requests or editing existing ones, always make sure that you save your WebSurge Session. By default changes are not saved until you explicitly save using the Save button (
ctrl-s) on the main toolbar.
The Request editor is a plain input form, but you can use the Preview tab in the right main panel to 'preview' the raw request in more visual Http header format. This Preview mode is also editable and can often be easier to visually edit headers and Http content.
To test individual requests you can use the Run button on the Request Toolbar, which executes the active Http Request and displays the full request and response trace in the Previewer.
- Using the lower request toolbar icon
- Using the Run button in the request or preview views
- Using the Request List Context Menu and Run Request
- Using the Main Menu Request->Run Request
- Alt-R from anywhere
After a request has been run, the request and response are displayed in the Previewer:
The previewer provides a detailed view of:
- The Request Headers
- Request Content (if POST/PUT)
- Response Headers
- Response Content
The previewer is used both to display requests before they execute, and request and response after a request has executed. In either case the Request Headers and Request Content are editable - any changes you make in the Previewer are reflected back to the actual Http Request and then viewable in the simple Http editor.
Next: More on Running Requests
Comment or report problem with topic