Command Line Tool
To better support remote automation testing, CukeTest also provides some commands for remote automation.
Executive End Command worker
CukeTest allows you to use the command line to start an independent execution end (Worker). This execution end will continuously listen to the specified port (default is 3131) so that connections can be made from the host or other devices to remotely operate the current device to execute automation tasks (such as remote spying, recording, running, etc.).
Get Started
Start worker:
cuketest worker
Start worker on MacOS:
/Applications/CukeTest.app/Contents/MacOS/cuke worker
After running the above command, if started successfully, the current device's IP information will be displayed, and a corresponding remote address link (e.g., ws://192.168.1.3:3131/ws) will be generated. You can enter this link into the Remote Connection dialog on the local host to establish a connection.
If the local host has multiple network cards; or virtual network cards created (by virtual machine software), multiple remote address links may be displayed. Please use the address link corresponding to the LAN IP. If starting
workerlocally, you can also uselocalhostinstead of IP information, such asws://localhost:3131/ws.
View Help
You can view detailed help information about the worker command through the following commands:
cuketest worker -h
or
cuketest worker --help
- When executing this command in MacOS
Terminal, pay attention to the differences in writing.
Command Line Options
| Option | Description |
|---|---|
--show-caps |
Show worker capabilities and environment configuration information. |
--agent-port <port> |
Set the port opened by Worker for Embedded Qt Worker connection. |
--log <value> |
Set log level, valid values are error, warn, info, debug, default is error. |
--log-file <value> |
Specify log file path to store log information. |
--minimize |
Automatically minimize all windows after worker starts to avoid interfering with subsequent runs. |
--port <value> |
Specify the port number listened by worker for custom network configuration. Default is 3131. |
--single-client |
Restrict to only one client connection to ensure test independence and security. |
--diag-agent |
Enable diagnostic mode to facilitate analysis and troubleshooting. |
-h, --help |
Show command help information. |
Using these options, you can customize the worker command according to actual needs to achieve efficient remote automated testing.