DevOps / Maven Surefire Plugin Interview Questions
How do you set environment variables for the test JVM in Surefire?
<configuration> <environmentVariables> <APP_ENV>test</APP_ENV> </environmentVariables> </configuration>
Unlike systemPropertyVariables, these become actual OS-level environment variables visible via System.getenv(), which matters for code that specifically reads env vars rather than system properties.
More Related questions...