Speed Up PR Tests with Smart Code Coverage-Based Selection
summary
Uses JaCoCo to record per-test coverage, stores a map of class → tests in Redis, and looks up changed files on each PR to run only relevant tests; the coverage map is rebuilt weekly by running tests sequentially with sequential per-test JaCoCo dumps (the full mapping job is ~6–7 hours). Mapping at class-level mapping keeps storage and lookup cheap; GitHub Actions + Jenkins coordinate selection, with a 30-test threshold that falls back to a full run. Result: about 5x resource reduction in practice, artifacts and blocking status checks preserve safety.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:57Code coverage selection
- 3:01Automatic selection design
- 5:31Coverage map pipeline
- 7:41PR validation with tests
- 10:56Implementation tools
- 13:08Real-world walkthrough
- 22:45GitHub Actions for PRs
- 32:25Next steps and AI research
- 33:33Q&A: Measuring success
- 36:08Q&A: Test level coverage
- 37:54Q&A: Shared code changes
- 38:59Q&A: Coverage map updates
- 39:23Q&A: Performance savings
- 41:23Q&A: Parallel execution limits
- 43:17Q&A: Complementing unit tests
- 44:21Q&A: Large coverage databases
related talks
35mSmarten Up Your Pipeline and Reduce Test Execution Time|
46mJava, Code Coverage & Their Best Friend: Bytecode
27mThe Journey of Testing
42mThe state of code coverage for Kotlin
28mWhen Can You Skip a Test? Tracking Test Impact
38mThe state of code coverage for Kotlin
43mMutation Testing
20mDevelopment efficiency with expert CI/CD strategies
