DevOps / Maven Surefire Plugin Interview Questions
How do you pass system properties into your tests through Surefire?
<configuration> <systemPropertyVariables> <env>staging</env> <config.path>/etc/app/config.yml</config.path> </systemPropertyVariables> </configuration>
Values set here appear as normal System.getProperty(...) calls inside the test JVM, letting you switch test behavior per environment without editing test code.
More Related questions...