Ziqi Wang
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Research Subjects
Ziqi Wang has a total of 11 co-authors. Here are the top co-authors by number of shared publications:
- Chen Yang
Tianjin University, Tianjin, China
3 shared publications - Junjie Chen
College of Intelligence and Computing, Tianjin University, China
3 shared publications - Dong Wang
Tianjin University, Tianjin, China
2 shared publications - Jianyi Zhou
Huawei Cloud Computing Technologies Co., Ltd., China
2 shared publications - Lin Yang
Tianjin University, Tianjin, China
2 shared publications - Bin Lin
Hangzhou Dianzi University, Hangzhou, China
1 shared publication
Latest Publications
- Open Access
- 1 October 2026
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (ISSTA) , 3454-3476
Context Matters: Improving the Practical Reliability of LLM-Based Unit Test Generation (Experience Paper)
Automated unit test generation has recently benefited from advances in large language models (LLMs), yet our industrial deployments reveal a persistent gap between promising research results and practical usability. In real-world projects with complex frameworks and cross-file dependencies, LLM-generated tests frequently fail to compile, require costly manual repair, or provide unstable coverage improvements. This paper reports our experience in designing, deploying, and evaluating CATGen , a context-aware workflow for LLM-based unit test generation, informed by repeated industrial failures and refinements. Rather than relying on LLMs to infer incomplete project context, we found that compilation robustness critically depends on making project-level dependencies explicit, stabilizing test class scaffolding, and replacing iterative LLM-based repair with lightweight static analysis. These experience-driven insights shaped CATGen’s multi-stage design, which combines structured context retrieval, deterministic test skeleton construction, and program analysis–based post-processing. We evaluate CATGen on real-world complex focal methods from proprietary industrial projects and additionally on the Defects4J benchmark to assess generalizability. Across both settings, CATGen substantially improves compilation success and structural coverage while significantly reducing generation time and token consumption compared to existing LLM-based approaches. Our results demonstrate that reliable LLM-based unit test generation in practice depends less on prompt engineering alone and more on systematic engineering support grounded in real-world development constraints.
- 1 October 2026
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (ISSTA) , 3454-3476
Open AccessContext Matters: Improving the Practical Reliability of LLM-Based Unit Test Generation (Experience Paper)
Automated unit test generation has recently benefited from advances in large language models (LLMs), yet our industrial deployments reveal a persistent gap between promising research results and practical usability. In real-world projects with complex frameworks and cross-file dependencies, LLM-generated tests frequently fail to compile, require costly manual repair, or provide unstable coverage improvements. This paper reports our experience in designing, deploying, and evaluating CATGen , a context-aware workflow for LLM-based unit test generation, informed by repeated industrial failures and refinements. Rather than relying on LLMs to infer incomplete project context, we found that compilation robustness critically depends on making project-level dependencies explicit, stabilizing test class scaffolding, and replacing iterative LLM-based repair with lightweight static analysis. These experience-driven insights shaped CATGen’s multi-stage design, which combines structured context retrieval, deterministic test skeleton construction, and program analysis–based post-processing. We evaluate CATGen on real-world complex focal methods from proprietary industrial projects and additionally on the Defects4J benchmark to assess generalizability. Across both settings, CATGen substantially improves compilation success and structural coverage while significantly reducing generation time and token consumption compared to existing LLM-based approaches. Our results demonstrate that reliable LLM-based unit test generation in practice depends less on prompt engineering alone and more on systematic engineering support grounded in real-world development constraints.
- Top Cited PapersOpen Access
- 24 April 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (5) , 1-31
Advancing Code Coverage: Incorporating Program Analysis with Large Language Models
Automatic test generation plays a critical role in software quality assurance. While the recent advances in Search-Based Software Testing (SBST) and Large Language Models (LLMs) have shown promise in generating useful tests, these techniques still struggle to cover certain branches. Reaching these hard-to-cover branches usually requires constructing complex objects and resolving intricate inter-procedural dependencies in branch conditions, which poses significant challenges for existing techniques. In this work, we propose TELPA, a novel technique aimed at addressing these challenges. Its key insight lies in extracting real usage scenarios of the target method under test to learn how to construct complex objects and extracting methods entailing inter-procedural dependencies with hard-to-cover branches to learn the semantics of branch constraints. To enhance efficiency and effectiveness, TELPA identifies a set of ineffective tests as counter-examples for LLMs and employs a feedback-based process to iteratively refine these counter-examples. Then, TELPA integrates program analysis results and counter-examples into the prompt, guiding LLMs to gain deeper understandings of the semantics of the target method and generate diverse tests that can reach the hard-to-cover branches. Our experimental results on 27 open-source Python projects demonstrate that TELPA significantly outperforms the state-of-the-art SBST and LLM-enhanced techniques, achieving an average improvement of 34.10% and 25.93% in terms of branch coverage.
- 24 April 2026
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (5) , 1-31
Top Cited PapersOpen AccessAdvancing Code Coverage: Incorporating Program Analysis with Large Language Models
Automatic test generation plays a critical role in software quality assurance. While the recent advances in Search-Based Software Testing (SBST) and Large Language Models (LLMs) have shown promise in generating useful tests, these techniques still struggle to cover certain branches. Reaching these hard-to-cover branches usually requires constructing complex objects and resolving intricate inter-procedural dependencies in branch conditions, which poses significant challenges for existing techniques. In this work, we propose TELPA, a novel technique aimed at addressing these challenges. Its key insight lies in extracting real usage scenarios of the target method under test to learn how to construct complex objects and extracting methods entailing inter-procedural dependencies with hard-to-cover branches to learn the semantics of branch constraints. To enhance efficiency and effectiveness, TELPA identifies a set of ineffective tests as counter-examples for LLMs and employs a feedback-based process to iteratively refine these counter-examples. Then, TELPA integrates program analysis results and counter-examples into the prompt, guiding LLMs to gain deeper understandings of the semantics of the target method and generate diverse tests that can reach the hard-to-cover branches. Our experimental results on 27 open-source Python projects demonstrate that TELPA significantly outperforms the state-of-the-art SBST and LLM-enhanced techniques, achieving an average improvement of 34.10% and 25.93% in terms of branch coverage.
- Open Access
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 81-84
WiseUT: An Intelligent Framework for Unit Test Generation
Unit testing is critical but challenging. While LLMs excel at generating readable code, they often struggle with coverage, defect detection, and maintainability. We present WiseUT, an end-to-end framework integrating LLMs with program analysis to address these gaps. WiseUT employs analysis-guided prompting to broaden coverage, type-aware reflective validation to pinpoint genuine defects, and semantic purification for maintainability. Evaluations on open-source and industrial projects demonstrate that WiseUT consistently improves coverage, doubles precision in type error detection, and produces tests preferred by developers. Demo: https://www.youtube.com/watch?v=DmszXs0eEOE.
- 12 April 2026
- Published by Association for Computing Machinery (ACM)
- p. 81-84
Open AccessWiseUT: An Intelligent Framework for Unit Test Generation
Unit testing is critical but challenging. While LLMs excel at generating readable code, they often struggle with coverage, defect detection, and maintainability. We present WiseUT, an end-to-end framework integrating LLMs with program analysis to address these gaps. WiseUT employs analysis-guided prompting to broaden coverage, type-aware reflective validation to pinpoint genuine defects, and semantic purification for maintainability. Evaluations on open-source and industrial projects demonstrate that WiseUT consistently improves coverage, doubles precision in type error detection, and produces tests preferred by developers. Demo: https://www.youtube.com/watch?v=DmszXs0eEOE.