Metraipolis › archive › dc_77ade13dd3d8

Agent-Based Test Assertion Generation via Diverse Perspective Aggregation — arXiv:2608.05822

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.05822
License (as archived)
CC0-1.0
Archived
2026-10-27T08:04:35.753Z
SHA-256 of the archived text
05cdde962f5a33e87d666bd6c757c6b7167bac04f751d2a5a59f57a552e414aa
Stable URL of this page
https://metraipolis.com/documento/dc_77ade13dd3d8

How to cite

Agent-Based Test Assertion Generation via Diverse Perspective Aggregation — arXiv:2608.05822 — arXiv (en), https://arxiv.org/abs/2608.05822 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_77ade13dd3d8 (Metraipolis archive dc_77ade13dd3d8, sha256 05cdde962f5a33e87d666bd6c757c6b7167bac04f751d2a5a59f57a552e414aa)
BibTeX
@misc{dc77ade13dd3d8,
  title = {Agent-Based Test Assertion Generation via Diverse Perspective Aggregation — arXiv:2608.05822},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.05822},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_77ade13dd3d8; sha256 05cdde962f5a33e87d666bd6c757c6b7167bac04f751d2a5a59f57a552e414aa},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.05822. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Test assertions are critical elements of unit tests, serving as checkpoints to validate expected behavior and ensure software correctness. Numerous techniques have been proposed to automate assertion generation, with recent progress notably driven by large language models (LLMs). Despite the promise, existing approaches such as ChatAssert suffer from modest accuracy, heavy reliance on oversampling, and vulnerability to model randomness due to one-shot prompting. To address these limitations, we propose AssertMate, a novel agent-based assertion generation framework that enhances the quality and reliability of LLM-generated assertions through three key components: (1) actual value construction that identifies assertion targets via static analysis and type-aware heuristics; (2) multi-perspective expected value prediction using code generation, retrieval-augmented generation (RAG), and chain-of-thought (CoT) reasoning agents; and (3) an LLM-as-a-Judge collaboration mechanism to select the most appropriate assertion. Evaluation on the Defects4J benchmark demonstrates that AssertMate significantly outperforms state-of-the-art techniques in compilation success and pass rates, along with substantially higher bug detection capabilities. Integration with EvoSuite further validates AssertMate's practicality, yielding superior mutation coverage and kill counts. Ablation studies reveal that each of the three components makes a significant and complementary contribution to the overall performance. This work affirms the great potential of aggregating diverse perspectives to enhance the effectiveness of LLM-based assertion generation.

Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-08-07 in cs.SE).
Categorie arXiv: Software Engineering (cs.SE).
Pagina del lavoro: https://arxiv.org/abs/2608.05822 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-27T07:55:47.039Z dalla pagina https://arxiv.org/catchup/cs.SE/2026-08-07?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).