If your project requires any special options to the JVM to run, these can be passed to Cover 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
JVM_ARGS environment variable can also be used for memory management. In fact, any JVM arguments documented at: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html can be added to the
Any environment variables that your project requires at runtime should be set in the environment in which you are running Cover. If this is not possible then the
--environment KEY=VALUE command line option can be used to configure additional environment variables.
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 (
Gradle) to supply your environment variables to your tests.
--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