Skip to main content

Launch Parameters

Description#

In this section, you find the list of all params which can be used to customize Drill apps.

Introduction - How to pass Drill params#

TypeAdditional InfoExample
java argsthe supplied command-line arguments as an array of String objects-agentpath:mingwX64-0.8.0-15/ drill_agent.dll=drillInstallationDir=mingwX64-0.8.0-15/, adminAddress=localhost:8090, agentId=Petclinic, buildVersion=0.1.0, logLevel=DEBUG -jar spring-petclinic.BUILD-SNAPSHOT.jar
System variablesDRILL_PLUGINS_REMOTE_ENABLED
Java System variable-D[drill.example]
config filefor java-agentsee example below
by maven/gradle pluginfor autotest agentssee example below

Java Agent#

List of parameters#

ParameterDescriptionRequiredDefault valueExample/Format(Default=String)
agentpathThe file where stores the agentyesa relative or absolute path, for example: mingwX64-0.7.0/drill_agent.dll
agentIdName of agentyesPetclinic
adminAddressDrill Admin API URLyeslocalhost:8090
drillInstallationDirThe folder where stores agent files(a relative or absolute path)yesmingwX64-0.7.0/
buildVersionbuildVersion of a target application if it is not set manually then it will calculate by system env JAVA_APP_JAR , for example, "/deployments/tmp/src/gs-spring-boot-docker-0.1.0.jar" → "gs-spring-boot-docker-0.1.0" otherwise it will set "unspecified"no0.1.0
instanceIdnogenerated by uuid4()
groupIdThis parameter groups your agents in one section. It is helpful if your app is based on a microservices arch.no""petclinic-micro
logLevelLogging agent worknoERRORTRACE|DEBUG|INFO|ERROR
logFilethe location where the logs will be storednonulla relative or absolute path, for example: "E:\projects\project\spring-petclinic run with agent\drill-log.log"
isTlsAppAdd the ability of an agent to gain incoming headers from an Https request. Process TLS only for tomcat architecturenofalseBoolean
isAsyncAppTODOnofalseBoolean
isWebAppTODOnofalseBoolean
webAppNamesthe list of TODO. use : as delimiter.no""web1:web2:etc
classScanDelaystart scanning after waiting of duration in millisecondsno05000 / int
configPathThe file where stores the config filenomingwX64-0.8.0-15/configFile.properties

System Variables#

Please, don't forget to reopen Command prompt window to apply changes. For more details see this information.

ParameterDescriptionRequiredExample / Format
DRILL_HTTP_HOOK_ENABLED drill.http.hook.enablednoIt can be true/false. By default = true.
DRILL_AGENT_CONFIG_PATHThe file stores the config filenoa relative or absolute path, for example: configFile.properties

Example of How to Pass Parameters by config file#

You can list params by properties file:

# This config file for Drill agent. docs: https://drill4j.github.io/docs/configuration/launch-parameters
#The folder where stores agent files(a relative or absolute path)
drillInstallationDir=mingwX64-0.8.0-15/
#Drill Admin API URL
adminAddress=localhost:8090
#adminAddress=host.docker.internal:8090
#Name of agent
agentId=Petclinic
#This parameter groups your agents in one section. It is helpful if your app is based on a microservices arch.
groupId=petclinic-micro
#buildVersion of a target application
#if it is not set manually then it will calculate by system env JAVA_APP_JAR , for example, "/deployments/tmp/src/gs-spring-boot-docker-0.1.0.jar" → "gs-spring-boot-docker-0.1.0"
#otherwise it will set "unspecified"
buildVersion=0.1.0
#Logging agent work. Options: TRACE|DEBUG|INFO|ERROR
logLevel=INFO
#a relative or absolute path for logging
#logFile=/drill-agent.log
#start scanning after waiting of duration in milliseconds, for example, 5 sec:
#classScanDelay=5000
#isTlsApp=true
#isAsyncApp=true
#isWebApp=true
#use ':' as delimiter
#webAppNames=web1:web2:etc

For Windows:
Point to the config file in java args (Command prompt example):

java -agentpath:mingwX64-0.8.0-15/drill_agent.dll=configPath=mingwX64-0.8.0-15/configFile.properties -jar spring-petclinic-0.1.0.BUILD-SNAPSHOT.jar

Or use the system variable DRILL_AGENT_CONFIG_PATH=mingwX64-0.8.0-15/configFile.properties

java -agentpath:mingwX64-0.8.0-15/drill_agent.dll -jar spring-petclinic-0.1.0.BUILD-SNAPSHOT.jar

For Docker:
If you are using docker images example, change "JAVA_TOOL_OPTIONS" parameter to:

- JAVA_TOOL_OPTIONS="-agentpath:/data/libdrill_agent.so=configPath=/data/configFile.properties"

Or use "DRILL_AGENT_CONFIG_PATH" parameter:

- JAVA_TOOL_OPTIONS="-agentpath:/data/libdrill_agent.so"
- DRILL_AGENT_CONFIG_PATH=/data/configFile.properties

Drill Admin#

ParameterDefault valueDescriptionRequiredExample / Format
{PLUGIN_NAME}_PLUGIN_VERSION""if it is an empty value then it will take the latest versionnokey=TEST2CODE_PLUGIN_VERSION value=0.7.0
DRILL_AGENTS_SOCKET_TIMEOUT120a timeout of agent answers in secondsno3000
DRILL_DEFAULT_PACKAGES""when you register an agent you can set the default packagesnoorg/springframework/samples/petclinic
DRILL_PLUGIN_CACHEtruea cache for messages from pluginsnotrue/false
DRILL_PLUGIN_CACHE_TYPEmapdb# jvm - on-heap cache mapdb - off-heap cachenojvm/mapdb
DRILL_JWT_LIFETIME60dlifetime of JWT tokenno
PORT8090port of adminno
DRILL_DEVMODEfalseno
DRILL_PLUGINS_REMOTE_ENABLEDtruethe flag that disables plugin loading from artifactorynoIt can be true/false.
DRILL_JWT_LIFETIME60dlifetime of tokenno

Autotest Agent#

ParameterRequiredDefault valueExampleDescription
versionyes""0.16.2https://github.com/Drill4J/autotest-agent/releases — take version from here
adminHostyes""localhost
adminPortno8080
agentId""like in Java agent
groupId""like in Java agent
logFilenonullfile("debug.log")create a log file
logLevelnoERRORLogging agent work
sessionIdnonullif empty it will generate by uuid4
runtimePathno
agentPathno

additionalParams:

ParameterDefault valueInput ExampleDescription
isRealTimeEnabletruerealtime feature
browserProxyAddressnulllocalhost:7777
isManuallyControlledfalseif it is true - start & stop session need to be do manually
sessionForEachTestfalseif it is true - start & stop session will be for each test it affects performance!
isGlobalfalseGlobal session
rawFrameworkPlugins""Separate by ";" example: cucumber-v4; cucumber-v5; junitstrategy for autotest agent if it is empty value it will set all strategies automatically

Example with gradle plugin#

plugins {
id 'com.epam.drill.agent.runner.autotest' version '0.2.3'
}
drill {
def testFramework = System.getProperty("testFramework") ?: ""
version = System.getProperty("autotestAgentVersion") ?: "0.16.12"
agentId = System.getProperty("agentId") ?: null
groupId = System.getProperty("groupId") ?: null
adminHost = System.getProperty("adminHost") ?: "localhost"
adminPort = System.getProperty("adminPort") ?: 8090
logLevel = com.epam.drill.agent.runner.LogLevels.TRACE
additionalParams =
[
"rawFrameworkPlugins": "$testFramework"
]
logFile = file("build/drill-autotest.log")
}

Test2Code Plugin#

Part of admin#

It is runtime configs

ParameterDefault valueDescriptionRequiredExample / Format
drill.plugins.test2code.features.realtimetruethe flag for disabling of the realtime feature when it uses StartSession in Active Scopenotrue/false
drill.plugins.test2code.features.realtime.cachedepends on drill.plugins.test2code.features.realtimenotrue/false
drill.plugins.test2code.send.packagestruethe flag for disabling of package sending Topics: .../scopes/{scopeId}/coverage/packages/{path}notrue/false

Part of agent#

ParameterDefault valueDescriptionRequiredExample / Format
drill.probes.perf.modefalsewhen it true, we use less memory but can lose coveragenotrue/false