Friday 15 May 2009

What is a test stub?

A test stub replaces a real component on which part of the system under test (SUT) relies.

A stub is used to inject the SUT with indirect inputs allowing the test to execute different paths through the SUT.

There are two types of test stub - a responder and a saboteur. A responder injects valid values and a saboteur injects errors or exceptions.

No comments:

Post a Comment

Followers

Contributors