The ABC’s of Testing Interfaces

What is a testing interface and how is it different from a test?

  • A test is: A formalized measurement and objective comparison to validate the behavior of a system
  • A measurement is: A repeatable operation in which a quantifiable result is returned
  • An objective comparison is: An operation in which a pass / fail result can be returned
  • A test interface is: A generic method for calling a test(s)…
It isn’t enough to have connections,
you need to know how to connect

Good versus ok interfaces, USB-C and USB-B…

USB-B is a pretty good interface; it allows for multiple devices to be connected, it is robust (e.g. you can jam it in a thousand times and it still works) and yet, it is only okay due to the “how many times before I get it in correctly” issue. USB-C, in addition to supporting faster data transfer,(1) solves the real issue, human usability.

It is for the developer

Good interfaces are designed for the end user in mind; e.g. the person who is not the expert on how to do the thing you want them to do. So what does that mean for how it should be implemented?

  • Consistency: you will have multiple test interfaces; keep the calling format consistent between them. For example if the unit under test is always an input argument, don’t have as the first argument in some and the last in others.
  • Error handling: If there are common errors then the interface should check for and if possible, correct the errors.
  • Fast: Introduction of an interface has some overhead; however, done properly there can be an overall reduction in execution time.
  • Informative: The testing interface (and infrastructure behind it) can implement error handling and messaging that would represent a burden for an end user to implement.

Footnotes

  1. USB-C data transfer rate is even greater then most people realize, e.g. the 15 seconds lost each time you try and connect a USB-B port is time you are not transferring data.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.