QASource Blog

QASource Blog API Testing Tutorial: 4 Key Considerations

API Testing Tutorial: 4 Key Considerations

API Testing, Test Automation | By Brandon Getty | August 19, 2014

The primary goal of API testing is code-level testing of both the application and the API. A full, organized suite of testing will verify the individual parts of each method, class, and package within the API, ensure security of the application’s code, and confirm the expected interaction between the API layer and the application. Grow your test toolkit by pairing this API testing tutorial with our blog post about API testing advantages.

As you test, take these four key considerations into account:

  1. Sub-tests help verify each method, class, and package of the API:
    1. Setup and upgrade API functions
    2. Perform basic tests of the API functions:
      • Functionality of multiple methods (from same or different APIs) in Sequence Mode
      • Functionality of selected methods in Isolation Mode
      • Functionality of complex method arguments with multiple levels
    3. Implement new or modified core functions
    4. Record existing areas affected by new defects
    5. Test for security of the functions
  2. Authentication methodology will help protect your application from unauthorized code access once the API layer is in place. Consider a two-factor authorization technique, such as Oauth2, for effective protection.
  3. Use a scenario-based testing environment for API functions with multiple input parameters. This ensures that all required workflows and request responses are verified during the test process. Need help with scenario-based testing environment? Feel free to contact us for QA services.
  4. Web interface verification is required for complex communication. Data exchange between the cloud, PC or mobile applications, and an associated web interface is common. API functions help maintain consistency of data across all three channels. As you develop tests for your API, be sure to consider complex scenarios involving your application’s web interface. If you are partnering with an offshore QA or outsourced QA team for API testing, work closely during test development.

Was this API testing tutorial helpful? Let us know in the comments below.

Click the button below to get your free guide, "A Guide to Selecting the Best Test Automation Tool."

New Call-to-action


This publication is for informational purposes only and nothing contained in it should be considered legal advice. We expressly disclaim any warranty or responsibility for damages arising out of this information and encourage you to consult with legal counsel regarding your specific needs. We do not undertake any duty to update previously posted materials.