Last Updated: February 25, 2016
·
470
· eulenherr

Test Your Interfaces (APIs)

Every self-respecting software company does usability tests these days. Of course we do, how else are we going to get hard data about how good our user interfaces work?

But rather than just testing ”end-users”, e.g. the people using our products, we recently started a different kind of interface testing. Our programming interfaces (APIs) have users, too! Who are we to not test them as well? If you’re ever in the position to write an API someone else (within or without your company) has to use, consider this process:

  1. Think up the possible uses and design the structure of your API accordingly.
  2. Implement a sample of it, without comments in the source code.
  3. Call a colleague to your desk and have him examine it. Don’t tell him anything, just that he has to think aloud so you can observe how well he understands your intentions with the API.
  4. Improve based on your observations and start a new iteration.

That’s how we do it, and we think it has helped us in making more understandable and simply better APIs.