Files
asmhatreandClaude Sonnet 5 bfc67986bc Add organising module: DisplayNameGenerator/@Nested/@Tag demos on JUnit 6.1.3
Companion code for the rewritten post "Organising and Displaying JUnit Tests:
@DisplayName, @Nested, @Tag (JUnit 5 -> JUnit 6)". Same suite also runs green
on JUnit 5.14.4 via -Djunit.version. Verified, not assumed: GA dates and
versions cross-checked against Maven Central metadata and docs.junit.org
release notes; the @TestMethodOrder-inheritance-into-@Nested-classes and
MethodOrderer.Default/ClassOrderer.Default behaviour differences between
5.14.4 and 6.1.3 are demonstrated by actually running the same source under
both engines (see organising/output/12-* and 14-*), not by reading about them.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YXCrLgRKFgCh9RHKW8xaqJ
2026-10-01 04:38:28 +00:00

25 lines
920 B
Bash
Executable File

#!/usr/bin/env bash
# Regenerates every file in output/ from scratch. Requires JDK 17+ and Maven on PATH.
set -euo pipefail
cd "$(dirname "$0")/.."
rm -rf output
mkdir -p output
echo "== 1/4: full suite on the default version (JUnit 6.1.3) =="
mvn -q -B test
echo "== 2/4: same suite on JUnit 5.14.4, keep only the two version-sensitive transcripts =="
mvn -q -B test -Djunit.version=5.14.4
cp output/12-nested-sibling-order-run1.txt output/12-nested-sibling-order-junit5.14.4.txt
cp output/14-method-order-inheritance.txt output/14-method-order-inheritance-junit5.14.4.txt
echo "== 3/4: back to the default version so output/ reflects JUnit 6.1.3 everywhere else =="
mvn -q -B test
echo "== 4/4: compiler-message transcripts for the broken/ demo, and a real mvn CLI tag-filter run =="
./scripts/broken-compile.sh
./scripts/mvn-cli-tag-filter.sh
echo "Done. See output/ for every transcript the article links to."