Files
JUnit_Tutorials/conditional/output/04-environment-variables.txt
T
Claude fd89649d8a Add conditional module: JUnit conditional test execution on 6.1.3 (JDK 25)
Fixtures for the OS, JRE, system property, environment variable and EnabledIf
conditions plus a custom ExecutionCondition, run through the JUnit Platform
launcher (in-process and in child JVMs) to capture real skip reasons; skipped
versus aborted lifecycle; stacking, class-level skips and the deactivate switch;
the 2025 article's code compiled as published; and a javap comparison of the
condition package in 5.14.4 and 6.1.3.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01G8ikz8xdWuTP5yun8DZ1hk
2026-10-11 10:24:30 +00:00

14 lines
674 B
Plaintext

PipelineTest in a fresh JVM, three times, with the environment set by the test.
CI unset, ENV=DEV (a developer laptop):
integrationWithExternalAPI() : SKIPPED (Environment variable [ENV] with value [DEV] does not match regular expression [STAGING])
performanceBenchmark() : SKIPPED (Environment variable [CI] does not exist)
CI=true, ENV=STAGING (a pipeline):
integrationWithExternalAPI() : PASSED
performanceBenchmark() : PASSED
CI=false, ENV unset:
integrationWithExternalAPI() : SKIPPED (Environment variable [ENV] does not exist)
performanceBenchmark() : SKIPPED (Environment variable [CI] with value [false] does not match regular expression [true])