mlsanityData to 7 Oct 2026

Assertion-Aware Test Code Summarization with Large Language Models

arXiv 2511.06227 ↗First posted 9 Nov 2025cs.SE cs.AI cs.CEcited by 0

Not on the map. Why?

Abstract (arXiv)

Unit tests often lack concise summaries that convey test intent, especially in auto-generated or poorly documented codebases. Large Language Models (LLMs) offer a promising solution, but their effectiveness depends heavily on how they are prompted. Unlike generic code summarization, test-code summarization poses distinct challenges because test methods validate expected behavior through assertions rather than implementing functionality. This paper presents a new benchmark of 91 real-world Java test cases paired with developer-written summaries and conducts a controlled ablation study to investigate how test code-related components-such as the method under test (MUT), assertion messages, and assertion semantics-affect the performance of LLM-generated test summaries. We evaluate four code LLMs (Codex, Codestral, DeepSeek, and Qwen-Coder) across seven prompt configurations using n-gram metrics (BLEU, ROUGE-L, METEOR), semantic similarity (BERTScore), and LLM-based evaluation. Results show that prompting with assertion semantics improves summary quality by an average of 0.10 points (2.3%) over full MUT context (4.45 vs. 4.35) while requiring fewer input tokens. Codex and Qwen-Coder achieve the highest alignment with human-written summaries, while DeepSeek underperforms despite high lexical overlap. The replication package is publicly available at https://doi.org/10. 5281/zenodo.17067550

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 22 of its 38 references that are in the map. First posted on arXiv 9 Nov 2025.

Builds on

22 of 38 references.

References · 22

  1. 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
  2. 2023A Survey of Large Language Modelscited by 2,537
  3. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  4. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  5. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  6. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  7. 2024A Survey on Large Language Models for Code Generationcited by 646
  8. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  9. 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
  10. 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
  11. 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
  12. 2023Distilled GPT for Source Code Summarizationcited by 30
10 more
  1. 2024Source Code Summarization in the Era of Large Language Modelscited by 30
  2. 2024Prompting in the Wild: An Empirical Study of Prompt Evolution in Software Repositoriescited by 16
  3. 2024Can Large Language Models Serve as Evaluators for Code Summarization?cited by 12
  4. 2024Leveraging Large Language Models for Enhancing the Understandability of Generated Unit Testscited by 11
  5. 2024PromptSet: A Programmer's Prompting Datasetcited by 9
  6. 2024ASSERTIFY: Utilizing Large Language Models to Generate Assertions for Production Codecited by 4
  7. 2021Test Smell Detection Tools: A Systematic Mapping Studycited by 3
  8. 2024Icing on the Cake: Automatic Code Summarization at Ericssoncited by 2
  9. 2023An Exploratory Study on the Usage and Readability of Messages Within Assertion Methods of Test Casescited by 1
  10. 2025Assertion Messages with Large Language Models (LLMs) for Codecited by 1

Built on by

Not cited yet.