# FAQs

### How do I pass property values as system properties from command line to tests run via Maven?

Maven adds an extra layer between the command line and the tests themselves.  Two common plugins are used to run tests within Maven:  [maven-failsafe-plugin](https://maven.apache.org/surefire/maven-failsafe-plugin/plugin-info.html) for integration tests and [maven-surefire-plugin](https://maven.apache.org/surefire/maven-surefire-plugin/plugin-info.html) for unit tests.  Both pass parameters the same way from command line:

```bash
mvn clean verify -DargLine="-DMyPropertyName=MyPropertyValue"
```

`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.
