mlsanityData to 7 Oct 2026

StubCoder: Automated Generation and Repair of Stub Code for Mock Objects

arXiv 2307.14733 ↗First posted 27 Jul 2023cs.SEcited by 1

Not on the map. Why?

Abstract (arXiv)

Mocking is an essential unit testing technique for isolating the class under test (CUT) from its dependencies. Developers often leverage mocking frameworks to develop stub code that specifies the behaviors of mock objects. However, developing and maintaining stub code is labor-intensive and error-prone. In this paper, we present StubCoder to automatically generate and repair stub code for regression testing. StubCoder implements a novel evolutionary algorithm that synthesizes test-passing stub code guided by the runtime behavior of test cases. We evaluated our proposed approach on 59 test cases from 13 open-source projects. Our evaluation results show that StubCoder can effectively generate stub code for incomplete test cases without stub code and repair obsolete test cases with broken stub code.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). First posted on arXiv 27 Jul 2023.

Builds on

No reference list yet.

Built on by

Cited by year

Citing papers per year: 2024: 1.

1 paper.