Executable but Unfaithful: Mock Object, Stub, and Assertion Generation by LLMs and Coding Agents
Mocking is a foundational practice in unit testing, enabling developers to isolate the code under test by replacing real dependencies with simulated alternatives. Automating the generation of mock objects, stubs, and mock assertions has been a long-standing research goal. However, capture-and-replay approaches rely on...