What is a mock? - Manual - AxUnit-ST - AxUnit ST documentation package - AxUnit-ST,

AxUnit-ST CLI Tool (test)

Portfolio
SIMATIC AX
Product
AxUnit-ST
Software version
8.0.33
Edition
04/2025
Language
English (original)
Package Name
@ax/axunitst-docs

In software development, a mock is a simulated or imitated object that replicates the behavior of a real object or component within a system. It is created for the purpose of testing and verifying the functionality, interactions, and dependencies of other components in isolation.

Mocks are commonly used in unit testing, where the goal is to test individual units of code, such as functions or methods, in isolation from the rest of the system. By replacing dependencies or collaborators of the unit under test with mock objects, you can control the behavior and responses of those dependencies during testing.

When writing unit tests, mocking is a very important mechanic to test specific code parts of an object.