Knowledge Base > DCover CLI > Runtime Environment

Runtime Environment

If your project requires any special options to the JVM to run, these can be passed to DCover using the JVM_ARG environment variable. This is useful if you need to pass the details of a user id, or which database to use, as properties to the JVM. The two examples below show passing a user_id with an authentication token:


set JVM_ARGS="-Duser_id=Sue -Duser_auth_token=1234"
dcover.bat create


export JVM_ARGS="-Duser_id=Sue -Duser_auth_token=1234"
dcover create

The JVM_ARGS environment variable can also be used for memory management. In fact, any JVM arguments documented at: can be added to the JVM_ARGS variable.

Environment Variables

Any environment variables that your project requires at runtime should be set in the environment in which you are running DCover.

Note that if tests are created using environment variables you should ensure that those same environment variables are available to test execution. Therefore you may need to configure your build tool (Maven, Gradle) to supply your environment variables to your tests.

System Properties

The -D or --define option allows the user to pass additional system properties to dcover for test creation and execution.

Any created tests may depend upon these user-specified system properties and may not execute successfully without them.

Therefore you will need to configure test execution in your build script to supply any user-specified system properties when executing those tests outside dcover.

For more detail about build tool configuration with system properties see the sections about Maven and Gradle.