tc_session
Connect to, launch, or stop a 1C test client over its network protocol, and list or disconnect active connections.
Instructions
Connect to, launch or stop the 1C test client. In the signatures below a trailing * marks a REQUIRED parameter — the group schema itself accepts every parameter as optional. Actions:
connect(port*, host='127.0.0.1', version=null) Connect to a running 1C test client (started with /TESTCLIENT -TPort ).
versionis the platform version (e.g. '8.5.1.1343') and MUST match the running platform, else the handshake fails; if omitted a built-in default is used. Call this before any other tc_* tool. A different host/port creates another connection. The same host/port reconnects that client; its connection_id is retained, but find elements again before using them.disconnect() Close the connection to the test client.
launch_client(base*, port=null, server=False, user=null, password=null, version=null, exe=null, extra_args=null, wait=30, connect=True) Launch a 1C test client and wait until it accepts connections on
port, then optionally connect to it.baseis a file infobase path (default), or 'server\infobase' whenserver=True.user/password— infobase credentials (optional; the password is passed on the command line and is visible in the OS process list).exe— full path to 1cv8.exe on Windows, or 1cv8/1cv8c on Linux (else env TC1C_PLATFORM_EXE or standard install path). Only the 1C platform executable is launched. Omit port to allocate a free local port. Each launch creates a separate connection_id. Linux requires access to a graphical session via the server's DISPLAY/XAUTHORITY environment. With connect=false ok means only that the port answers — the client can be up and showing an error, so check it before relying on it.list_connections() List registered clients with connection_id, host, port, base, user and recording status. base/user are known for clients launched here; listing does not probe client health.
stop_client() Stop the test client started by launch_client in this connection, and disconnect from it. Unsaved changes may be lost. If stopping fails, retain the process so the call can be retried. connection_id selects the client. With several clients, connection_id is required. Use tc_session(action="list_connections").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exe | No | ||
| base | No | ||
| host | No | ||
| port | No | ||
| user | No | ||
| wait | No | ||
| action | Yes | ||
| server | No | ||
| connect | No | ||
| version | No | ||
| password | No | ||
| extra_args | No | ||
| connection_id | No |