Verify
The routine for confirming a backend change is correct. Fix the implementation
to satisfy the checks; never weaken the checks to fit the implementation.
Steps
- Scope the change. Note which files/modules changed. If you touched
repositories, Flyway migrations (src/main/resources/db/migration), or any
*IT test, mark that integration verification is required.
- Fast feedback while iterating (optional). For a quick loop on one area,
run the narrowest useful target first, e.g.
gradlew test --tests "com.epam.brn.service.SomeServiceTest".
- Run the gate.
gradlew verify— this isktlintCheck+ unittest, no
Docker. Do not treat the task as done until it exits 0.
- On failure, find the root cause. Read the actual failure (assertion,
compile error, or ktlint rule). Fix the implementation. Only edit a test
if the test itself is provably wrong — then state explicitly what you changed
and why. Never delete/skip/@Disabled a test just to go green.
- Repeat steps 3–4 until
gradlew verifypasses.
- Style. Run
gradlew ktlintFormatbefore finishing; the ktlint gate fails
the build otherwise. Re-run gradlew verify if it reformatted anything.
- Integration (only if step 1 flagged it). Ensure Docker is running, then
gradlew integrationTest. These use a Postgres Testcontainer and are slow —
run them once at the end, not on every edit.
Conventions to respect
- Test stack is fixed: JUnit 5 + MockK + kotest-assertions. Do not introduce
Mockito, AssertJ, Kluent, kotlin.test, or JUnit Assertions (see CLAUDE.md).
gradlew verifyis a local pre-PR gate, not a replacement for CI/Sonar.