CHAPTER
1
■■■
API Testing
1.0 Introduction The most fundamental type of software test automation is automated API (Application Programming Interface) testing. API testing is essentially verifying the correctness of the individual methods that make up your software system rather than testing the overall system itself. API testing is also called unit testing, module testing, component testing, and element testing. Technically, the terms are very different, but in casual usage, you can think of them as having roughly the same meaning. The idea is that you must make sure the individual building blocks of your system work correctly; otherwise, your system as a whole cannot be correct. API testing is absolutely essential for any significant software system. Consider the Windowsbased application in Figure 1-1. This StatCalc application calculates the mean of a set of integers. Behind the scenes, StatCalc references a MathLib.dll library, which contains methods named ArithmeticMean(), GeometricMean(), and HarmonicMean().
Figure 1-1. The system under test (SUT) 3