Testing an API

Select a test tool and verify that your API works as you intended.

Before you publish an API where customers can access it, you need to test it and ensure that it is defined and implemented correctly. API Connect offers tools for running both simple and complex tests, in different environments. Use the following list of options to choose the test tool that best meets your needs:

  • Execute and debug the API in the Test tab

    On the Test tab, you can quickly invoke your API from the API Connect UI with minimal preparation. The Test tab offers full control over the API call through a simple set of fields where you can define your request. The response includes both a visual flow diagram and a code trace that shows how the API’s process flow is executed. Note: the Test tab tool is only available to APIs that use the DataPower API Gateway.

  • Call the API externally from the Automated API behavior testing application as explained in Testing an API with Automated API behavior testing

    Automated API behavior testing provides a simple set of fields where you can quickly invoke your API. You can automate tests and define schedules for running them. You can even set up API monitoring and receive alerts on your API health before issues occur.

  • Call the API from a local test environment

    The Local Test Environment is a lightweight API Manager, running on your computer, that allows you to rapidly test APIs without connecting to an API Connect management server.

  • Run a simple test in the Policies editor
    Note: The Test panel is deprecated and might be removed without warning.
  • Use the Try it tool in the Explorer tab to run simple tests

    You can use the Explorer tab in the API editor to see how your APIs look to a consumer in the Developer Portal. You can check the descriptions of the different artifacts, and review any schemas or examples, and you can also use the Try it tool to test the behavior of the API.

Note: Due to CORS, when a test call is made with a browser-based API test tool, an HTTP OPTIONS call is made to the API first. The OPTIONS call:
  • Does not use any credentials, so is not attributed to any consumer organization.
  • Is logged as an API event in the analytics data. Because the OPTIONS call does not use credentials, the API events are only visible in analytics data in the Cloud Manager and API Manager UIs. The OPTIONS events are not visible in the developer portal analytics view, which includes only analytics data for a single consumer organization.
  • Is not included in consumer rate limits.
  • Is included in consumption-based licensing (if used).