This paper proposes DeepMOSA to generate test cases that achieve high branch coverage for Python projects. DeepMOSA combines the genetic algorithm phase and the deadlock resolution phase to generate a set of test cases aiming to achieve 100% coverage. The genetic algorithm phase creates an initial population randomly and evolves it iteratively. When the genetic algorithm phase fails to enhance branch coverage, the deadlock resolution phase prioritizes uncovered branches and creates prompts to query the LLM asynchronously for new test cases. To demonstrate the branch coverage achieved by the proposed method, experiments were conducted on ten well-known GitHub projects. We remove the modules for which all methods achieve 100% coverage to make the comparison more convincing, and then report the coverage on the remaining modules. In terms of average branch coverage, when evaluated with DeepSeek, DeepMOSA achieves an average of 60.1% coverage, outperforming DynaMOSA (48.3%) and CodaMOSA (52.4%). With Devstral, DeepMOSA achieves an average of 60.9% coverage, outperforming DynaMOSA (48.3%) and CodaMOSA (52.2%). With Gemma, DeepMOSA achieves an average of 57.3% coverage, outperforming DynaMOSA (48.3%) and CodaMOSA (46.6%). In terms of branch coverage over time, DeepMOSA achieves a faster coverage increase than DynaMOSA and CodaMOSA. These results demonstrate the potential effectiveness of the proposed method in practice.
No takes yet. Share an insight, caveat, or question.
Dao et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: