CATE: Change-Aware Obsolete Test Co-evolution via Semantic Clustering and Impact Propagation
Summary
No summary yet. VIRAT can read this paper and write a plain-language summary of its aim, methods, key findings and limitations.
Summarise with VIRAT Free to try with your Science Catalogs account.Abstract
# CATE: LLM-powered Change-aware Test Evolution Framework An open-source implementation of CATE, an LLM-based framework for change-aware test case evolution. CATE addresses the challenge of maintaining valid test suites during rapid code evolution by integrating large language models (LLMs) with dependency graph analysis to enable fine-grained change decomposition, semantic impact propagation, and adaptive test updates. ### Abstract Traditional regression testing methods treat code changes as monolithic units, failing to distinguish between different functional intents and often leading to inefficient test maintenance. CATE solves these limitations with a three-stage framework: 1. **Change Semantic-aware Clustering**: Decompose code changes into atomic units and group by functional intent2. **Change Impact Propagation**: Trace semantic impact through dependency graphs to identify affected components3. **Obsolete Test Identification & Update**: Validate test validity and generate updated tests using LLM reasoning This repository provides a production-ready reference implementation of the CATE framework, compatible with Java codebases. ### Framework Overview  ## 📁 Repository Structure ```CATE/├── cate/ # Core CATE framework implementation│ ├── changeClustering/ # Stage 1: Change Semantic-aware Clustering│ │ ├── changeDecomposition.py # Atomic Change Point (ACP) decomposition from diffs│ │ ├── semanticClustering.py # LLM-powered semantic grouping of ACPs│ │ ├── astParser.py # Java AST parsing utilities│ │ ├── diffParser.py # Git diff parsing and normalization│ │ ├── featureExtractor.py # Semantic feature extraction for clustering│ │ └── validationUtils.py # Trivial change filtering│ ├── changePropagation/ # Stage 2: Change Impact Propagation│ │ ├── changePropagation.py # End-to-end propagation workflow orchestrator│ │ ├── impactPropagationEngine.py # BFS/DFS impact path traversal engine│ │ ├── impactNodeIdentification.py # Initial impact node detection│ │ ├── impactPatternAnalyzer.py # LLM-powered impact semantic analysis│ │ ├── pathFiltering.py # Trivial path pruning and priority ranking│ │ ├── models.py # Data models for impact propagation│ │ └── toolInvoker.py # Dependency graph tool wrapper│ ├── obsoleteIdentification/ # Stage 3: Obsolete Test Identification & Update│ │ ├── obsoleteIdentification.py # End-to-end test validation workflow│ │ ├── obsoleteTestIdentifier.py # LLM-powered test obsolescence classification│ │ ├── testUpdater.py # LLM-driven test case code generation│ │ ├── impactGraphPruner.py # Impact graph pruning for test targeting│ │ ├── testRetriever.py # Test file discovery and parsing│ │ └── models.py # Test-related data models├── data/ # Datasets├── experiment/ # Experimental implementations├── utils/ # toolset└── README.md # This file``` ## 🚀 Quick Start ### 1. Environment Setup - **Python 3.8+**: Recommended for full compatibility- **Java Runtime**: Required for Java AST parsing- **Git**: Required for change history analysis ### 2. Installation ```bash# Clone the repositorycd CATE # Install Python dependenciespip install -r requirements.txt``` ### 3. API Key Configuration CATE uses LLM-powered reasoning. Configure your API key via environment variables: **Linux/macOS**```bashexport ANTHROPIC_API_KEY="your-api-key-here"``` **Windows (PowerShell)**```powershell$env:ANTHROPIC_API_KEY = "your-api-key-here"``` ### 4. Dataset Preparation #### ObsoBenchI Dataset The ObsoBenchI dataset is ready to use with 7006 samples for test case identification. #### ObsoBenchU Dataset Download the 10 reference repositories:```bashcd data/ObsoBenchU./download.sh``` ### 5. Test Module Entries Run individual stages for targeted testing: ```python# Stage 1: Change Clusteringfrom cate.changeClustering.changeDecomposition import ChangeDecompositionfrom cate.changeClustering.semanticClustering import SemanticClustering # Stage 2: Impact Propagationfrom cate.changePropagation.changePropagation import ChangePropagationWorkflow # Stage 3: Test Identification & Updatefrom cate.obsoleteIdentification.obsoleteIdentification import ObsoleteIdentificationWorkflow``` ## 🎯 Core Framework Modules ### Stage 1: Change Semantic-aware Clustering - **Change Decomposition**: Split git diffs into atomic change points (ACPs), filtering trivial changes like formatting or comments- **Semantic Clustering**: Use LLM to group ACPs by functional intent, with three merging criteria: - Functional consistency (same class/method modification) - Symbol consistency (shared variable/method references) - Dependency consistency (connected via dependency graph paths) ### Stage 2: Change Impact Propagation - **Impact Node Identification**: Locate initial nodes affected by code changes- **Impact Propagation**: Traverse dependency graphs to map full impact paths using BFS/DFS- **Path Filtering**: Prune trivial paths (e.g., logging, utilities) and rank paths by impact severity- **Semantic Analysis**: Generate natural language descriptions of impact flows using LLM ### Stage 3: Obsolete Test Identification & Update - **Impact Graph Pruning**: Focus on test-relevant nodes (branch modifications, logic changes)- **Test Validity Check**: Classify tests as valid (0) or obsolete (1) using LLM against failure criteria- **Test Generation**: Generate updated test cases that maintain coverage and pass against modified code- **Validation**: Ensure updated tests meet coverage requirements and do not introduce regressions
Fields of Study & Subjects
Software Testing and Debugging Techniques
Software Engineering Research
Software System Performance and Reliability
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 30 March 2026
- Language
- EN