tc_session
Launch, connect to, or stop the 1C test client and control call logging to automate UI tests and record or replay scenarios.
Instructions
Connect to, launch or stop the 1C test client.
marks a required action parameter; the group schema treats action parameters as optional. Pass action="name" and only that action's parameters. Actions:
connect(port=null, host='127.0.0.1', version=null, profile=null) Connect to a running /TESTCLIENT -TPort client using port or a list_profiles profile; explicit parameters override the profile. version must match the full running version (omitted: built-in default). Connect before UI actions. A new host/port creates a connection; the same host/port reconnects that client: connection_id is retained, but find elements again.
disconnect(force=False) Close the connection to the test client. force=true interrupts a pending network call; its result may be unknown. The 1C application remains running.
get_logging_status() Return call logging status, paths, call count, disk usage and any reason recording stopped.
launch_client(base=null, port=null, server=False, user=null, password=null, version=null, exe=null, extra_args=null, wait=120, connect=True, desktop='default', profile=null) Launch and optionally connect. base is a file infobase path, or 'server\infobase' with server=true; alternatively use a list_profiles profile. Explicit parameters override the profile. user/password are infobase credentials; the password is visible in the process command line. exe is the full path to 1cv8/1cv8c (with .exe on Windows); omitted: configured or auto-detected installation. A version prefix selects the latest matching build; use a full version or exe for an exact build. Omitted port allocates a free local port; each launch creates a connection_id. wait covers total startup including readiness; increase for slow bases. Linux default needs DISPLAY/XAUTHORITY; isolated needs Xvfb. isolated uses a separate desktop (Windows 10+/Linux) and stops with the server. connect=false confirms only an answering port, not a usable client.
list_connections() List registered clients with connection_id, profile, host, port, base, user and recording status. busy, active_action and active_seconds describe the running call. connected reports an open connection, not client responsiveness. base/user are known for clients launched here.
list_profiles() List named launch/connect profiles and their descriptions and settings, without passwords. Pass the name as profile to the listed action. Does not connect to or launch a client.
start_logging(screenshot_mode=null, reports=null) Start a call journal. Repeated start keeps the current journal. screenshot_mode: off, actions (changes and errors), or all calls; default follows server settings. reports: ["html"], ["allure"], ["html", "allure"], or ["none"] for JSONL only. Omit reports to use the server's configured formats; the response lists the selected reports. Saves files on the server. Allure results are finalized when logging stops.
stop_client(graceful_timeout=15) Stop the test client started by launch_client in this connection, and disconnect from it. Tries normal exit for graceful_timeout seconds (0..120, default 15), confirming known exit questions, then forces termination if needed. 0 forces termination immediately. Unsaved changes may be lost. Returns shutdown: graceful, forced, or already_exited; forced includes shutdown_reason. A failed stop retains process ownership for retry.
stop_logging() Stop call logging, finalize selected reports and return their paths. Does not stop the client. Set connection_id when several clients are connected. Use tc_session(action="list_connections"). Success may omit target/connection echoes and shorten window details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exe | No | ||
| base | No | ||
| host | No | ||
| port | No | ||
| user | No | ||
| wait | No | ||
| force | No | ||
| action | Yes | ||
| server | No | ||
| connect | No | ||
| desktop | No | ||
| profile | No | ||
| reports | No | ||
| version | No | ||
| password | No | ||
| extra_args | No | ||
| connection_id | No | ||
| screenshot_mode | No | ||
| graceful_timeout | No |