Research
LLM-Based Mockless Unit Test Generation: Two Hallucination Causes Identified and Mitigated
Xu, Wang, and Briand tackle mockless Java unit test generation, identifying two root causes of LLM hallucination: 'not knowing' (LLM lacks dependency knowledge) and 'not caring' (LLM ignores known constraints). Their approach exercises real low-level code instead of mocks, producing tests that catch integration bugs mocking-based approaches miss. The technique addresses strict language constraints and dependency awareness gaps.
Source
↳ Follow the thread