Skip to main content
Version: DAI 7.0

Running the Agent in Command Line Mode (DAI Run Agent)

You can configure and run the DAI Run Agent from the command line, without the user interface.

  1. From the command prompt, navigate to the agent directory. For example:

    • For Windows: C:\Program Files (x86)\eggplantDAIRunAgent\
    • For Mac: /Applications
    • For Linux: (The path in which your eggplantDAIRunAgent executable is extracted to)
  2. Run the agent executable, and add the appropriate arguments:

    • For Windows: eggplantDAIRunAgent.exe [arguments]
    • For Mac: ./eggplantDAIRunAgent [arguments]
    • For Linux: ./eggplantDAIRunAgent [arguments]
warning

Take care when launching the agent with command-line arguments via the command window. Mistyping an argument will cause the command window to close instantly and no logs will be created.

Example of Running the DAI Run Agent

Here are some examples of how to run the DAI Run Agent on the respective supported operating systems:

Windows

cd C:\Program Files (x86)\eggplantDAIRunAgent
eggplantDAIRunAgent.exe --ini-file envs\my_env.ini --host-url https://server.company.com --env-id 1 --gui True --log-level DEBUG

Mac

./eggplantDAIRunAgent --ini-file envs/my_env.ini --host-url https://server.company.com --env-id 1 --gui True --log-level DEBUG

Linux

./eggplantDAIRunAgent --ini-file envs/my_env.ini --host-url https://server.company.com --env-id 1 --gui True --log-level DEBUG

Command-Line Arguments

ArgumentsEnvironment VariablesDescription
--ini-file FILEDAI_AGENT_INI_FILEThe location of the environment settings (.ini) file downloaded from the DAI server. The (.ini) file is only created during loading the downloaded ini file.

Default:
Windows: C:\Users\{user}\.eggplantDAI.ini (It is marked as hidden.)
Mac: ~/.eggplantDAI.ini
Linux: ~/.eggplantDAI.ini
--host-url TEXTDAI_HOST_URLThe Eggplant DAI server that you connect to, e.g. https://server.company.com. This maps to host_url in your environment settings (.ini) file.
Use this parameter in conjunction with --env-id to select the appropriate section of the environment settings (.ini) file.
If not specified, uses the first section in the .ini file.
--env-id INTEGERDAI_EXEC_ENV_IDThe ID of the execution environment on the DAI server.
Use this parameter in conjunction with --host-url to select the appropriate section of the environment settings (.ini) file.
If not specified, uses the first section in the .ini file.
--suite-root DIRECTORYEGGDRIVE_SUITE_ROOTThe folder used to store downloaded suites.
Eggplant Functional suites will be uploaded and downloaded as subfolders of the specified root folder.

Default:
Windows: C:\ProgramData\Eggplant\agent\Suites
Mac: ~/Library/Application Support/agent/suites
Linux: ~/.local/share/agent/suites
--gui [True|False]Specifies whether or not to display the Eggplant Functional UI.

Default: False
--drive-port INTEGEREGGDRIVE_PORTThe port Eggplant Functional will use to listen for eggDrive commands.
If not specified, it will use a randomly assigned free port.
--epf FILEEGGDRIVE_EXECThe location of Eggplant Functional.

Default:
Windows: C:\Program Files\Eggplant\Eggplant.app\runscript.exe
Mac: /Applications/Eggplant.app/Contents/Mac/runscript
Linux: /usr/local/bin/runscript
--log-level [INFO|DEBUG|TRACE]The logging level.

INFO: basic messsaging to confirm that things are working as expected.
DEBUG: provides more detailed messaging typically for when diagnosing problems.
TRACE: shows logs of all levels.

Default: INFO
--log-folder DIRECTORYDAI_AGENT_LOG_FOLDERThe folder used to store log files.

Default:
Windows: C:\ProgramData\Eggplant\agent\logs
Mac: ~/Library/Logs/agent
Linux: ~/.cache/agent/log
--licenser-host TEXT[Optional] An extra EPF argument to specify Licenser Host.
--versionShow the version
--helpShow the help message and exit.