API


  • API Runner is where you create and run the API tests of your applications

  • To run API request you need to first select the Method Type and paste URL of the API. Press Send button to send the request to API or press Add API Test button to save the request

Local Image

Try this sample Method Type and API URL

  • Method Type: GET
  • API URL:https://um5fdww2pj.execute-api.us-east-1.amazonaws.com/dev/todos

Information for API request:

  • Most of the API require additional inputs to perform the request such as parameters, Headers, Body(JSON), and so on.

  • To add parameters of the request you can select the respective Parameters tab and press the Add Parameter buttons to add the required information.

Local Image

Sending an API request with authentication:

  • In case if your hosted API needs an authentication you can go to the Authorization tab and select the BasicAuth from the dropdown list (Default it is set as Noauth) and then input the Username and Password. You are now ready to send authenticated requests.

Local Image

  • Every API response consists of different values like status code, body, headers, and the time to complete the API request. Below image shows how API response received is portrayed.

Local Image

Adding Assertions:

  • In automation process it is important that you verify your output using an assertion. To add an assertion in the API Runner, go to the Assertions tab. You can add one or more assertions here.

Follow these steps to add assertions:

  1. Choose the response type
  2. Choose the assertion's condition
  3. Input the value to be checked

You are done adding the assertion

Local Image

Local Image

Variables:

  • Variables tab is useful to store the values that are received as a response from the API request sent. To save responses go to the Variables tab and follow these steps:
  1. Add Variable
  2. Give a name to the variable for better understanding of the team
  3. Input the JsonPath of the value to be stored from the response body
  4. To use the stored value in the variable as expected assertion you can use __name of the variable__ in any other API request

Local Image

View or execute a saved API request:

  • When you are in API Runner page use View Saved Tests button to view the saved tests

  • Select one or more API saved tests and run the selected tests by default the tests shows the last executed run status information

  • Results will show up the API execution history

Local Image

results matching ""

    No results matching ""