FAQs
Frequently Asked Questions
Last updated
Was this helpful?
Frequently Asked Questions
Last updated
Was this helpful?
Maven adds an extra layer between the command line and the tests themselves. Two common plugins are used to run tests within Maven: for integration tests and for unit tests. Both pass parameters the same way from command line:
mvn clean verify
instructs Maven to create a fresh build, run units tests (surefire), run integration tests (failsafe) and verify the tests passed.
-DargLine="-DMyPropertyName=MyPropertyValue"
sets a System Property named argLine
, instructing both plugins to include -DMyPropertyName=MyPropertyValue
in the command when they invoke a new process to run the tests, resulting in passing system properties to those tests. Quotes are needed if there are any spaces.