Copier template for a Java 21 test automation project: Gradle, TestNG, q4j configuration, Checkstyle, and SpotBugs.
Prerequisites:
-
git -
gh, authenticated (gh auth login, thengh auth setup-gitso Copier can clone over HTTPS) - Copier >= 9.18.2 (
uv tool install copierorpipx install copier)
From your repository root:
copier copy --vcs-ref "$(gh release view --repo quokkify/java-test-automation-template --json tagName --jq .tagName)" gh:quokkify/java-test-automation-template test-automationResult:
test-automation/
.copier-answers.yml
.gitattributes
.gitignore
README.md
AGENTS.md (agent rules: layout, config, q4j docs)
build.gradle
settings.gradle
gradlew, gradlew.bat
gradle/ (scripts, version catalog, wrapper)
src/main/java/<root>/<name>/ config, model, service, helper, verification, step (BaseSteps)
src/test/java/<root>/<name>/ test (BaseTest, StarterTest)
tools/ (Checkstyle, SpotBugs)
Copier asks for project_name, package_root (e.g. dev.quokkify), and package_name (defaults to the project name). Everything except README.md and AGENTS.md is yours after creation; copier update refreshes those two. See the generated README.
From inside the generated folder:
copier update --vcs-ref "$(gh release view --repo quokkify/java-test-automation-template --json tagName --jq .tagName)"An update across a release with a Copier migration stops and asks for --trust. Add the option to run the
migration; the script lives in migrations/ of this repository. The 2.0.0 migration removes the q4j
architecture gate; then follow section 3 of the generated docs/agents/architecture-verification.md to
enable the ArchGate plugin that replaces it.
pip install PyYAML==6.0.3 copier==9.18.2
python scripts/validate.py --static # render, ownership, update checks
python scripts/validate.py # also runs Gradle (needs JDK 21)