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.
-
Install the DAI Run Agent as described in the For Windows section of the Install an Agent topic on the Environments page.
-
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)
- For Windows:
-
Run the agent executable, and add the appropriate arguments:
- For Windows:
eggplantDAIRunAgent.exe [arguments]
- For Mac:
./eggplantDAIRunAgent [arguments]
- For Linux:
./eggplantDAIRunAgent [arguments]
- For Windows:
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
If you provide the DAI Run Agent the path to the downloaded .ini
file, and the file contains only one section with settings in it, you don't need to provide additional arguments to run it. In a bash shell terminal on a Mac Or Linux-based system, if EPF's GUI is not required, you can launch the run agent with these arguments:
./eggplantDAIRunAgent --ini-file "my envs/my_env.ini"
You must wrap the file path in quotes if it contains spaces.
Following are examples of how to run the DAI Run Agent on different operating systems with more verbose, but optional, arguments. You only need to provide the --host-url
and --env-id
to select a section in the .ini
file if it contains multiple sections, as the one used by the DAI Design Agent to store all your settings.
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/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
For a full list of command-line arguments, how to use them, and what they do, you can the launch the runner with the --help
flag.
On Windows:
cd C:\Program Files (x86)\eggplantDAIRunAgent
eggplantDAIRunAgent.exe --help
On Mac/Linux:
./eggplantDAIRunAgent --help
The following is a list of the supported command-line arguments and their corresponding environment variables.
Arguments | Environment Variables | Description |
---|---|---|
--ini-file FILE | DAI_AGENT_INI_FILE | The 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 TEXT | DAI_HOST_URL | The 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 INTEGER | DAI_EXEC_ENV_ID | The 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 DIRECTORY | EGGDRIVE_SUITE_ROOT | The 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 INTEGER | EGGDRIVE_PORT | The port Eggplant Functional will use to listen for eggDrive commands. If not specified, it will use a randomly assigned free port. |
--epf FILE | EGGDRIVE_EXEC | The location of Eggplant Functional runscript file. The runscript file is for running Eggplant Functional from the command line. Default: Windows: C:\Program Files\Eggplant\Eggplant.app\runscript.exe Mac: /Applications/Eggplant.app/Contents/MacOS/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: DEBUG | |
--log-folder DIRECTORY | DAI_AGENT_LOG_FOLDER | The 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. | |
--version | Show the version | |
--help | Show the help message and exit. |
Eggplant Functional Stop and Restart Settings for Test Configuration Runs
When running a test configuration, you can configure the length of time to run Eggplant Functional (EPF) before restarting or the grace periods for poll-time stopping and restarting with the following environment variables. See Eggplant Functional Stop and Restart Settings for Test Configuration Runs for details.
Environment Variables | Default | Description |
---|---|---|
RESTART_EPF_AFTER_SECONDS | 1800 | When running a test configuration, you can configure the interval in seconds that EPF runs before restarting. This variable takes effect after the current step finishes and before moving to the next step if the defined time is exceeded. It only applies to test configurations run with the DAI Run Agent. During live runs, EPF runs continuously without restarting. If you do not want EPF to restart during your test runs, you can disable this option by setting it to 0 (zero). |
EPF_QUIT_POLL_TIME_SECONDS | 20 | The grace period for EPF to quit during the restart process. |
EPF_RESTART_POLL_TIME_SECONDS | 120 | The grace period for EPF to start up after having quit. EPF_RESTART_POLL_TIME_SECONDS does not include EPF_QUIT_POLL_TIME_SECONDS . |