help
parameter, CLI will display self-explanatory usage instructions, e.g.-v
or --version
option will print the TestProject Agent CLI version, e.g.-f
or --fork
option CLI process can be forked when the Agent process is started. In this mode, no STD will be attached and CLI will not wait for the Agent to exit. This might be useful in CI / CD pipelines and various configurations.2.2.0
, to allow external connectivity for the CLI or the SDK incoming requests, additional parameters should be used:--grpc-address
, Agent can be instructed for binding its gRPC to other host and port.--rest-address
, Agent can be instructed for binding its Web Server to other hosts and port.10.0.0.2
and port 65000
65001
10.0.0.2:65000
, and SDK can communicate with the Agent using any of the available hosts and port 65001
.--max-workers
option, it is possible to set the maximum amount of workers for an Agent. Workers amount is the number of tasks an Agent can perform in parallel.If there is no Agent running, a relevant error message will appear.
Agent must be running before a registration attempt. It can be started using the start command if necessary.
-a
or --alias
and the -t
or --token
required options that should be used to invoke the command properly. For example right after installation, you can run the following command to register the Agent as MyAgent:If the Agent is already registered, a relevant error message will appear.
--json
is set:Chrome and Firefox have a headless operation mode. When configuring execution settings, useCHROME_HEADLESS
andFIREFOX_HEADLESS
when required.
list
parameter specified, CLI will list devices:--android
or --ios
options, list can be filtered by a mobile platform.--physical
or --virtual
options, either physical or virtual devices only can be requested.--json
, that will output results as JSON, for example:apps
parameter specified, CLI will list apps installed on a device. It requires an additional argument -d
or --device
to be specified, for example:--json
option same output will be presented as a JSON:Protocol version indicates what is the TestProject Agent CLI compatible version for this backup file.
--json
the option is used:--help
option:-s
or --settings
should be used to provide an external setting file.--browser
or --device
to provide a list of target browsers or devices as command arguments.Since no setting are bundled, and none are provided, default target will be used. Chrome or any other installed browser for Web test and any connected device for Mobile.
-s
or --settings
option:settings.yaml
instead of the settings inside the archive. The same could be achieved using the --browser
option:--device
option:-p
or --parameters
option should be used:reports
folder.-A
or --agent
parameter that is used to specify a remote Agent. Using this URL, a report that is generated by the remote Agent can be retrieved from the remote machine.-o
or --output-path
parameter can be used:MyFirstTestBackup.zip
bundle and generate a report in ~/Desktop
, for example:Specifying a custom report file location will result in no report URL link appearing in logs.
/Users/testproject/Desktop/MyFirstTest-{TIMESTAMP}.html
--plain
option to output plain text progress.Progress does not indicate steps results such as passed or failed, but only a periodic indication of the execution advancement. Therefore, when using the--plain
option, the same step might appear more than once or do not appear at all if execution advances too quickly.
--parallel-targets
or --parallel-tests
options, package execution can be parallelized. By default the execution is serial, meaning that tests will be executed one by one on each defined browser/device.--parallel-targets
will result in tests being executed one by one on all defined browsers/devices, in parallel.--parallel-tests
will result in all tests being executed on all defined browsers simultaneously. If a test has a data source, all data iterations will run at the same time as well.These options override any similar settings set via the package's bundle settings YAML file.
2.2.0
, there are several global options that can be used with all the commands that interact with an Agent. For example, connect
, devices
, browsers
, etc.-A
or --agent
option, allows targeting a remote Agent, in the same network, on a different machine:10.0.0.2:9999
. The accepted format for the target Agent address is {HOST}:{PORT}
.Running packages on a remote Agent, is currently not supported.
-C
or --connect-timeout
option, specified in seconds, as shown below: