API testing with TruAPI


With CloudQA's new streamline interface you can start testing your API's with only a few clicks

  1. Basic API testing
  2. API SUite

1. Basic API testing
  • 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 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:

    • Choose the response type
    • Choose the assertion's condition
    • 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 an API request sent. To save responses go to the Variables tab and follow these steps:

    • Add Variable
    • Give a name to the variable for better understanding of the team
    • Input the JSON Path of the value to be stored from the response body
    • 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


2. API Suite
  • API test suite feature helps you manage automated testing of an application and also frequent testing of your API. You can select the saved API tests to create a group and schedule them.

    Local Image

results matching ""

    No results matching ""