DeepMOSA: Genetic-Based Unit Test Generation for Python Projects

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.

Authors

Publication Details

Journal
International Journal of Information Technology & Decision Making
Published
2026-10-30
DOI
https://doi.org/10.1142/s0219622026500975
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

DeepMOSA: Genetic-Based Unit Test Generation for Python Projects

Hung Pham Ngoc, Hoang-Viet Tran, Duc-Anh Nguyen, Le-Bao-Minh Dao et al.
3 links
International Journal of Information Technology & Decision Making
Software Testing and Debugging Techniques
article

DeepMOSA: Genetic-Based Unit Test Generation for Python Projects

Hung Pham Ngoc, Hoang-Viet Tran, Duc-Anh Nguyen, Le-Bao-Minh Dao, Hong-Quang Dau
article en

Abstract

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.

International Journal of Information Technology & Decision Making
Openalex Percentile: Top 4%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
DeepMOSA: Genetic-Based Unit Test Generation for Python Projects — Hung Pham Ngoc, Hoang-Viet Tran, et al. · International Journal of Information Technology & Decision Making (2026) | TGRS Research Map | TGRS