Contract-Based Mocking for Services-Oriented Development

Fritz Solms, Linda Marshall · 2016

Unit testing of software components requires that a component is tested in isolation. However, many components require the services of other components to provide their functionality. In order to decouple the component being tested from its dependencies, one commonly uses mock objects. Mocking frameworks which are currently used in industry use dynamic mock object generation with the mocking behaviour specified where the mocking is required, e.g. within unit tests. There is no guarantee that the mocking behaviour is consistent with the behaviour required from the component being mocked. Furthermore, these mock objects are not reused across unit tests and other areas where mocking is required.

Read the paper · More papers on PaperTik