Architecture
UniTrack is a multi-module Maven project under the org.alexmond group, modelled on the
conventions of jhelm.
1. Modules
|
Domain model (JPA entities), repositories, Flyway migrations, report ingestion and the reporting services (flaky detection, quality gate, failure clustering, triage). |
|
Spring Boot application: the REST ingest API, the |
The parent POM (unitrack-parent) centralises plugin management and the shared build
conventions — spring-javaformat, Checkstyle (SpringChecks plus file/method size limits),
PMD, JaCoCo — along with release and docker profiles.
2. Data model
The core entities, persisted via Spring Data JPA:
-
Project — a tracked codebase; owns many test runs.
-
TestRun — one upload: branch, commit, build URL, an optional
flagandrunKey, aggregated pass/fail totals, and a line-coverage percentage. -
TestSuiteResult / TestCaseResult — the parsed JUnit tree; cases carry status, captured
system-out/system-err, and attachments. -
CoverageReport / CoverageFileEntry — parsed JaCoCo counters, per file.
-
FlakyTest — a test observed passing and failing on the same commit.
-
TriageRule — a pattern that auto-categorises failures.
-
User / ApiToken — accounts and hashed personal access tokens.
Schema evolution is managed by Flyway migrations V1–V7 under
unitrack-core/src/main/resources/db/migration.
3. Request flow
-
CI uploads multipart JUnit + JaCoCo files to
POST /api/v1/ingest. -
IngestServiceparses the XML, creates aTestRun, aggregates totals and coverage, links it to itsProject, and runs flaky detection and triage. -
QualityGateServicecompares the run against the project baseline on the base branch. -
GitHubStatusServiceoptionally publishes a commit status back to the pull request. -
The Thymeleaf dashboard renders projects, runs, trends, flaky tests, clusters and rules.