Quarkus Verification Loop
Run before PRs, after major changes, and pre-deploy.
When to Activate
- Before opening a pull request for a Quarkus service
- After major refactoring or dependency upgrades
- Pre-deployment verification for staging or production
- Running full build → lint → test → security scan → native compilation pipeline
- Validating test coverage meets thresholds (80%+)
- Testing native image compatibility
Phase 1: Build
If build fails, stop and fix compilation errors.
Phase 2: Static Analysis
Checkstyle, PMD, SpotBugs (Maven)
Common Issues to Address
- Unused imports or variables
- Complex methods (high cyclomatic complexity)
- Potential null pointer dereferences
- Security issues flagged by SpotBugs
Phase 3: Tests + Coverage
Test Categories
Unit Tests
Test service logic with mocked dependencies:
Integration Tests
Test with real database (Testcontainers):
API Tests
Test REST endpoints with REST Assured:
Coverage Report
Check target/site/jacoco/index.html for detailed coverage:
- Overall line coverage (target: 80%+)
- Branch coverage (target: 70%+)
- Identify uncovered critical paths
Phase 4: Security Scanning
Dependency Vulnerabilities (Maven)
Review target/dependency-check-report.html for CVEs.
Quarkus Security Audit
OWASP ZAP (API Security Testing)
Common Security Checks
Phase 5: Native Compilation
Test GraalVM native image compatibility:
Native Image Troubleshooting
Common issues:
- Reflection: Add reflection config for dynamic classes
- Resources: Include resources with
quarkus.native.resources.includes
- JNI: Register JNI classes if using native libraries
Example reflection config:
Load Testing with K6
Run:
Metrics to Monitor
- Response time (p50, p95, p99)
- Throughput (requests/sec)
- Error rate
- Memory usage
- CPU usage
Phase 7: Health Checks
Expected responses:
Phase 8: Container Image Build
Container Security Scan
Phase 9: Configuration Validation
Environment-Specific Checks
Phase 10: Documentation Review
Generate OpenAPI spec:
Verification Checklist
Code Quality
Testing
Security
Deployment
Native Image
Automated Verification Script
CI/CD Integration
GitHub Actions Example
Best Practices
- Run verification loop before every PR
- Automate in CI/CD pipeline
- Fix issues immediately; don't accumulate debt
- Keep coverage above 80%
- Update dependencies regularly
- Test native compilation periodically
- Monitor performance trends
- Document breaking changes
- Review security scan results
- Validate configuration for each environment