Rethinking Cognitive Complexity for Unit Tests: Toward a Readability-Aware Metric Grounded in Developer Perception
This program is tentative and subject to change.
Automatically generated unit tests—from search-based tools like EvoSuite or LLMs—vary significantly in structure and readability. Yet most evaluations rely on metrics like Cyclomatic Complexity and Cognitive Complexity, designed for functional code rather than test code. Recent studies report SonarSource’s Cognitive Complexity yields near-zero scores for LLM-generated tests, but have not assessed its behavior on EvoSuite-generated tests or examined its relevance for test-specific structures. We introduce textbf{CCTR}, a textit{Test-Aware Cognitive Complexity} metric tailored for unit tests. CCTR integrates structural and semantic features like assertion density, annotation roles, and test composition patterns—dimensions ignored by traditional complexity models but critical for understanding test code. We evaluate 15,750 test suites generated by EvoSuite, GPT-4o, and Mistral large across 350 classes from Defects4J and SF110. Results show CCTR effectively discriminates between structured and fragmented test suites, producing interpretable scores that better reflect developer-perceived effort. By bridging structural analysis and test readability, CCTR provides a foundation for more reliable evaluation and improvement of generated tests. We publicly release all data, prompts, and evaluation scripts to support replication.
This program is tentative and subject to change.
Thu 11 SepDisplayed time zone: Auckland, Wellington change
10:30 - 12:00 | Session 7 - Testing 2Registered Reports / Research Papers Track / Journal First Track / Tool Demonstration Track / Industry Track / NIER Track at Case Room 3 260-055 Chair(s): Jiajun Jiang Tianjin University | ||
10:30 15m | OptionFuzz: Fuzzing SMT Solvers with Optimized Option Exploration via Large Language Models Research Papers Track Yuhao Peng (Institute of Software, Chinese Academy of Sciences; University of Chinese Academy of Sciences), Jingzheng Wu Institute of Software, The Chinese Academy of Sciences, Xiang Ling Institute of Software, Chinese Academy of Sciences, Zhiyuan Li , Tianyue Luo (Institute of Software Chinese Academy of Sciences), Yanjun Wu Institute of Software, Chinese Academy of Sciences | ||
10:45 15m | Nüwa: Enhancing MLIR Fuzzing with LLM-Driven Generation and Adaptive Mutation Research Papers Track Bocan Cao Northwest University, Weiyuan Tong Northwest University, Zhanyong Tang Northwest University, Zixu Wang Northwest University, Hao Huang Northwest University, Yuheng Yan Northwest University | ||
11:00 10m | MediumDarwin: LittleDarwin Grows with Performance and Research-oriented Extensions Tool Demonstration Track Sajjad Hesamipour Khelejan School of Computer Science and Statistics, Trinity College Dublin & Research Ireland Lero, Thomas Laurent School of Computer Science and Statistics, Trinity College Dublin & Research Ireland Lero, Anthony Ventresque School of Computer Science and Statistics, Trinity College Dublin & Research Ireland Lero | ||
11:10 10m | Rethinking Cognitive Complexity for Unit Tests: Toward a Readability-Aware Metric Grounded in Developer Perception NIER Track Wendkuuni Arzouma Marc Christian OUEDRAOGO University of Luxembourg, Yinghua Li University of Luxembourg, Xueqi Dang University of Luxembourg, SnT, Xin Zhou Singapore Management University, Singapore, Anil Koyuncu Bilkent University, Jacques Klein University of Luxembourg, David Lo Singapore Management University, Tegawendé F. Bissyandé University of Luxembourg | ||
11:20 15m | Targeted Test Selection Approach in Continuous Integration Industry Track Pavel Plyusnin T-Technologies, Aleksey Antonov T-Technologies, Vasilii Ermakov T-Technologies, Aleksandr Khaybriev T-Technologies, Margarita Kikot T-Technologies, Nikolay Bushkov T-Technologies, Stanislav Moiseev T-Technologies | ||
11:35 15m | An Empirical Investigation into the Capabilities of Anomaly Detection Approaches for Test Smell Detection Journal First Track Valeria Pontillo Gran Sasso Science Institute, Luana Martins University of Salerno, Ivan Machado Federal University of Bahia - UFBA, Fabio Palomba University of Salerno, Filomena Ferrucci Università di Salerno DOI Pre-print | ||
11:50 10mResearch paper | Assessing Reliability of Statistical Maximum Coverage Estimators in Fuzzing Registered Reports Danushka Liyanage University of Sydney, Australia, Nelum Attanayake University of Sydney, Australia, Zijian Luo University of Sydney, Australia, Rahul Gopinath University of Sydney DOI Pre-print |