White-box Test Techniques - API Testing

9 important questions on White-box Test Techniques - API Testing

Is API more a technique or a test type?

More a testtype, in certain aspects it is quite similar to testing a GUI. The focus is on the evaluation of input values and returned data.

Why is robust error handling important for API's.

Because programmers who use APIs to access services external to their own code may try to use API interfaces in ways for which they were not intended.

Why is combinatorial testing often necessary while testing API's?

Because of many different interfaces may be required because API's are often used in conjunction with other APIs, and because a single interface may contain several parameters, where values of these may be combined in many ways.
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

API's are often loosely coupled, what can be a problem then and what should be tested then?

The possibility of lost transactions or timing glitches.
Thorough testing of the recovery and retry mechanisms.

What's important when an organization provides an API interface?

That all services have a very high availability; this often requires strict reliability testing by the API publisher as well as infrastructure support.

When is API testing applicable?


API testing is becoming more important for testing systems of systems as the individual systems become distributed or use remote processing as a way of off-loading some work to other processors. Examples include:
  • Operating systems calls
  • Service-oriented architectures (SOA)
  • Remote procedure calls (RPC)
  • Web services
  • Software containerization.

What are limitations/difficulties with API testing?

Testing an API directly usually requires a Technical Test Analyst to use specialized tools.
Because there is typically no direct graphical interface associated with an API, tools may be required to setup the initial environment, marshal the data, invoke the API, and determine the result.

What is the minimum of an API test?

At a minimum the API test should include making calls to the API with both realistic input values and unexpected inputs for checking exception handling.
More thorough API tests may ensure that callable entities are exercised at least once or all possible calls are made at least once.

What kind of defects can be found by API testing?

Interface issues are common, as are data handling issues, timing problems, loss of transactions and duplication of transactions.

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo