Spring Boot–based impact analysis service for intelligent CI test selection using Git diff analysis and JGit.
This repository acts as the orchestration and impact-analysis engine for a cross-repository selective testing framework.
This repository contains the Fintech Spring Boot microservice that exposes an API for impact-based test selection.
It is part of a cross-repository CI/CD intelligence system where code changes are analyzed to determine impacted test suites dynamically.
This repository is a proof-of-concept (PoC) demonstrating deterministic impact-aware CI execution using Git diff analysis.
The implementation was validated in controlled scenarios to dynamically map code changes to impacted Karate test suites.
- Detect changed files using JGit diff analysis
- Map source code changes to Karate test tags
- Expose impact-analysis APIs for CI pipelines
- Enable selective test execution instead of full regression runs
Dev Repo (fintech-impact-services)
│
├── Spring Boot Application
├── JGit Diff Analysis
├── Impact Mapping Engine
├── REST API (/test-selector)
▼
Test Automation Repo (karate-change-impact-test)
├── Calls API
├── Fetches impacted tags
└── Runs selected Karate tests
The service compares branches using JGit:
- Identifies changed files
- Extracts file paths from diff
Files are mapped to test execution tags.
| Change Type | Test Tag |
|---|---|
| /payments/ | @payments |
| /transactions/ | @transactions |
| /transfer/ | @transfers |
| /auth/ | @regression |
| pom.xml | @regression |
| No match | @smoke |
HTTP GET /api/dev-ops/test-selector?targetBranch=main~1
Json
{
"impacted_tags": "@payments,@transactions"
}
- Uses JGit to compute diff between branches
- Extracts modified file paths
- Applies rule-based mapping engine
- Returns impacted test tags as JSON
Prerequisites Java 17 Maven Git
bash
mvn spring-boot:run
curl
http://localhost:8080/api/dev-ops/test-selector?targetBranch=main~1
- Java 17
- Spring Boot
- JGit
- Maven
- 🔁 Enables deterministic impact-based test selection
- ⏱ Demonstrated CI runtime reduction in controlled scenarios
- 💰 Reduces unnecessary regression execution
- 🧠 Supports targeted test execution in microservice environments
- 🔗 Integrates with GitHub Actions–based CI workflows
- Git diff–based analysis engine
- Rule-based tag mapping
- Designed for GitHub Actions–based CI integration
In microservice architectures, running full regression suites for every change creates CI bottlenecks and unnecessary compute overhead.
This project demonstrates a lightweight deterministic approach to impact-aware CI execution without requiring external dependency graph tooling or SaaS platforms.
- Rule-based mapping (not ML-driven)
- Requires full git history for accurate diff
- Depends on branch comparison strategy
Designed and implemented a Git diff–based impact analysis service for intelligent test selection in CI/CD pipelines.