RapiTest lets you stub (replace or modify) functions in your source code in multiple ways. While these terms may be used differently by various members of the critical software industry, RapiTest supports the following types of behavior:
- Stub – the original function is replaced with a function that returns a fixed value. The inputs of this function can be checked.
- Mock (or spy) – the original function is called, but its inputs and outputs are checked.
- Fake – the original function is replaced with a complex function that imitates the behavior of the replaced function. This can include complex logic.
While RapiTest supports all of these behaviors, it does not make a distinction between them. It stubs functions to represent the behavior specified in test cases.
RapiTest stubs include a wide variety of functionality, including letting you check how many times a stubbed function is called during a test.
Feature applies to: