HTTP Authorization Tutorial

Applies to ReadyAPI 3.51, last modified on March 21, 2024

This tutorial describes how to enable HTTP authorization for the following HTTP form:

<form method="post" action="/login">
    Username: <input type="text" name="username" required>
    Password: <input type="password" name="password" required>
    <input type="submit" value="Login">

Here is what this form may look like in a browser:

Form view

Click the image to enlarge it.

To authorize using this form:

  1. Create an HTTP Request test step with the appropriate settings (username, password, method).

    The New HTTP Request test step dialog

    Click the image to enlarge it.

    In this example, the username is admin, the password is p@ssw0rd, and the HTTP method is specified as POST.

    Make sure the HTTP request endpoint matches the address in the action attribute of the form element.
  2. Open the created HTTP request and select the Post QueryString option.

    Setting the Post QueryString option

    Click the image to enlarge it.

  3. Set the HTTP Request test step to keep the session alive by using the Maintain HTTP Session option.

    • Select the test case in the Navigator.

    • Click on the test case toolbar.

    • Switch to the Basic tab.

    • Select the Maintain HTTP Session option.

      The Maintain HTTP Session option

      Click the image to enlarge it.

    • Click OK.

When everything is set up, the session will be maintained, and any other requests in the test will use the authenticated session.

See Also

About HTTP Authorization
HTTP Request Test Step

Highlight search results