Settings

Settings is the admin-only, central environment-profile editor. An environment (env) is a named settings blob — base URLs, credentials, emulator/ACS targets, MCP services, ClickHouse, Platform DB, Log Server, TestRail — stored centrally in the gateway profiles table (not in any single container’s run-reports/settings.json). A run picks an env from the environment dropdown that opens the run bar in Test cases; the gateway then materializes that env’s settings onto a worker (PUT /api/settings as admin) immediately before starting the run.

Settings — the central environment-profile editor

The screen is split into five sections, each with its own link (#settings/<id>) so a colleague can be sent straight to the right one:

Section Anchor What lives there

Profile & portals

#settings/env

Support / Management portal URLs, Backend UI URL, username and password, and the ISP mode policy (Set it — write the mode before the run; Verify only — mark a case blocked when the stand’s mode does not match).

Emulator & ACS

#settings/emulator

TR emulator URL, ACS URL, IoT emulator URL, and the USP ACS target (host, port, MTP, controller Endpoint ID).

Stand services

#settings/services

Configs Service, and the collapsible blocks: ClickHouse, Platform DB (with Test connection), Log server (SSH), NBI, and File server (FTP and HTTP addresses plus credentials).

Run behaviour

#settings/run

Pause between steps (entered in seconds), Sweep foreign domains before a run, and the domain skip-list.

Integrations

#settings/integrations

TestRail URL / email / API key / auto-sync interval, plus the Validation scan card.

Non-admins cannot see this section at all. They still select an env per run from the environment dropdown in the Test cases run bar — they just cannot view or edit the profiles behind it. See Accounts, Roles & Audit and Running Tests for the run-time selection.

At a glance
  • Settings is where an admin defines environments. Pick an existing profile from the Environment profile dropdown to edit it, or choose New to author a fresh one, then Save to store it back centrally on the gateway.

  • Save-as / New profile, list & select, Delete profile, and Export / Import (JSON of one or all profiles) all live in the profile bar at the top of the tab.

  • A profile can be bound to a stand. Deleting a profile removes only the profile: the emulator MCP sidecars are bundled per worker and shared by every env.

  • New fields beyond the original base-URL set: Platform DB (MySQL/Oracle), Log Server (SSH), and a jira_base_url used to render the case Reference as a link.

  • Secrets are redacted (**) in every Settings GET response — the UI round-trips the mask so saving never overwrites a stored secret.

A profile populates defaults — individual YAML cases still override per-test via their own base_url / credentials / emulator_serial fields. For the full env model, gateway routing, and stand binding see Environments & the Gateway.

Environment Profiles

The profile bar at the top of the tab manages the central profile set. All profile mutations are admin-only and persist in the gateway profiles table (scripts/auth_db.py — name, settings_json, created_by, updated_at).

Control Behaviour

Environment profile (dropdown)

Lists every central profile (GET /api/gateway/profiles). New clears the form to author a fresh env; selecting a name loads that env’s settings (GET /api/gateway/profiles/{name}) into the form below.

Save

Upserts the current form as the selected (or newly named) profile (POST /api/gateway/profiles with {name, settings}). A blank emulator_mcp_url is filled with the worker’s bundled sidecar, http://mcp-tr-emul:8082; nothing is provisioned per env.

Delete profile

Removes the selected profile. The button sits at the right end of the row and asks first. The button calls DELETE /api/gateway/profiles/{name}. Nothing else is torn down.

Export all / Export selected

Downloads a JSON backup — all profiles, or just the selected one — for versioning or transfer to another gateway.

Import

Uploads a previously exported JSON file and upserts the profiles it contains.

A profile can be bound to a stand so that stand defaults to that env. Stand binding and worker provisioning are covered in Environments & the Gateway.

What Lives in an Env Profile

These are the core fields stored in each profile. Switching environments is a matter of selecting (or authoring) a profile with the right set — you no longer hand-edit four URLs on a shared container.

Field Notes

Support Portal URL

Where the agent navigates for tests with portal: support. Hint shown inline, e.g. http://ui.test-agent.rd.friendly-tech.com/support-portal.

Management Portal URL

Same for portal: management.

Backend UI URL

FtApiClient uses this for monitoring rules, group updates, device tree queries (was labelled "Backend API URL"). Default: http://ui-backend.test-agent.rd.friendly-tech.com.

TR Emulator URL

TR-069 emulator HTTP API base. EmulatorMCP passes it to mcp-tr-emul as emulatorUrl on every call and queries it directly for parameters (/apiV2/parametersByPrefix), so an edit is live from the next run — no sidecar restart. The sidecar’s own TR069_EMULATOR_URL env is only the fallback for callers that pass no URL (e.g. bbf-tree-mcp). Default: http://tr069-emulator.test-agent.rd.friendly-tech.com.

TR Emulator MCP URL

mcp-tr-emul sidecar bundled in every worker stack — used by EmulatorMCP for start_serial_from_shared_folder, set_parameters_batch, invoke_event etc. Default http://mcp-tr-emul:8082 (resolved inside the worker’s docker network). It has no input on the Settings form: a profile that leaves it blank gets the bundled address, and because the runner passes the env’s emulator URL on every call, that one sidecar serves every environment (the per-env mcp-tr-emul-<env> wrapper stacks were collapsed on 2026-09-02).

ACS URL

The ACS endpoint the emulated device reports to (written to Device.ManagementServer.URL right after start_from_shared / start_protocol). Must point at the same environment as the Backend / Emulator URLs, otherwise the device materialises on the wrong ACS and the portal the test navigates to won’t see it. Default: http://ftacs.test-agent.rd.friendly-tech.com/ftacs/ACS.

ACS Username / Password

Basic/Digest credentials for authenticated CWMP registration. Empty = no auth (use the plain /ftacs/ACS endpoint); to exercise auth set the ACS URL to the /ftacs-basic/ACS or /ftacs-digest/ACS endpoint and fill these in.

IoT Emulator URL

REST base of the IoT emulator (USP / LwM2M / MQTT agents). Unlike the TR-069 sidecar, mcp-iot-emul is env-agnostic: the runner passes this URL on every call, so no per-env wrapper stack exists for it and an edit is live from the next run. Blank = "this stand has no IoT emulator" — a protocol: USP case then ends blocked, not failed. Default: http://iot-emulator.test-agent.rd.friendly-tech.com. The sidecar’s own address is not a form field: it is fixed by the worker’s compose (IOT_EMULATOR_MCP_URL, default http://mcp-iot-emul:8082), exactly like mcp-tr-emul since the per-env wrappers were collapsed.

USP ACS Target

Host, port, MTP and controller Endpoint ID the emulated USP agent connects to. In a k8s env the emulator runs next to the ACS, so the in-cluster service name is right (ftacs, STOMP 61617); compose stands use the public host. Defaults: ftacs / 61617 / STOMP / self:ft:1.

MQTT Broker

Host, port, username, and password of the broker the emulated MQTT device connects to. The default port is 1883. Username and password are needed only when the MQTT Security row asks for them. Blank host = "this stand has no MQTT device". A case with protocol: MQTT then ends blocked, not failed.

Username / Password

Default portal credentials when a YAML leaves them blank. Default: admin / admin.

Keep the portal, backend, emulator, and ACS hosts inside one environment within a single profile. A mixed profile sets parameters on one emulator and reads state from another.

Platform DB

Drives the db_query step type (scripts/platform_db.py) — a state-read against the platform’s primary relational DB (one of MySQL / Oracle).

Field Notes

Platform DB Type

mysql, oracle, or empty to disable the feature.

Platform DB Host

DB host. Default rd.friendly-tech.com.

Platform DB Port

Blank/invalid falls back to the engine default (MySQL 3306, Oracle 1521). Default 30304.

Platform DB Name

Schema name for MySQL; the service_name for Oracle thin-mode DSN (host:port/service_name).

Platform DB User / Password

Connection credentials.

Log Server

Drives the log_check step type (scripts/log_server.py) — an SSH login that greps device/server logs for error patterns after a test runs. Stand-specific: an empty host disables the feature.

Field Notes

Log SSH Host

SSH host. Empty = log checks disabled.

Log SSH Port

Default 22.

Log SSH User / Password

SSH credentials.

Log Dir

Directory the log files live in.

Log Error Pattern

Regex / substring the check scans for.

MCP Services

Field Used by

BBF Tree MCP URL

The Generate Tree button in the Editor (NL → XML tree) and the converter’s Stage 2 LLM enrichment (fetch_bbf_spec_context) to ground prompts in TR-181 / TR-098 spec snippets. Deployed sidecar: http://bbf-tree-mcp:7020/sse.

Qdrant MCP URL

Direct Qdrant access for the converter’s ft_code lookup (legacy backend-RAG path, off by default — see importing-tests.adoc#xml-api). Production: http://ai.friendly-tech.com:8095.

Knowledge MCP URL

Stateless retrieval over ft_docs_v2 (AsciiDoc + Java) and ft_ui_map (widget catalog). Used by both the converter (TR-181 spec context for widget-scoring tests) and the test-runner Claude (proactive widget catalog prompt for interact steps). Defaults via the KNOWLEDGE_MCP_URL docker-compose env to http://ai.friendly-tech.com:7030/sse.

The TR-069 emulator MCP and the Playwright MCP are launched inside the worker container — no URL configuration needed.

ClickHouse

Optional block (collapsed by default — click the ▸ arrow to expand).

Used only when INTERFERENCE_DASHBOARD_SEED=true and a test has the RUN_INTERFERENCE_DIAGNOSTICS UI precondition. The agent writes synthetic points into ftacs_qoe_ui_data so the interference history widget renders deterministic colours / counts.

Field Default

ClickHouse URL

http://95.217.35.86:8123

Database

ftacs_qoe_ui_data

User

ftacs

Password

(redacted in GET responses)

TestRail Credentials & Links

Mandatory before any TestRail-import / reimport flow works.

Field Notes

TestRail URL

https://friendlytechnologies.testrail.io

TestRail Email

Personal SSO email or team account.

TestRail API Key

Generated from TestRail user profile → API Keys. Redacted in GET responses.

Auto-sync Interval (min)

0 turns the automatic sync off. A positive number starts the automatic sync once per interval. The automatic sync converts the changed cases again, at most 10 cases. For more changed cases, use Sync with TestRail now. See Automatic Sync.

Jira Base URL (jira_base_url)

Browse-URL prefix used to render a case’s Reference field as a clickable link. Default https://friendly-tech.atlassian.net/browse/.

The connection pill on the Tests tab and inside the TestRail modal reflects the current credential validity.

Secret Redaction

Secret fields are never returned verbatim over the Settings HTTP API — a GET masks each non-empty secret as **. The redacted keys are password, acs_password, clickhouse_password, platform_db_password, log_ssh_password, nbi_password, and testrail_api_key.

When the UI re-submits a profile it round-trips the mask for any secret the user did not change; the server swaps the mask back for the stored value on save, so a save never overwrites a real secret with the mask. An empty secret stays empty (so the UI can tell "unset" from "set"). Internal callers read the real values directly via load_settings().

Saving

  • Save — upserts the form as the selected/named central profile (POST /api/gateway/profiles). URLs are validated (must parse as http(s)://…​).

  • Reload / profile re-select — re-reads the profile from the gateway.

  • The status text next to the buttons shows the result (green = saved, red = validation error).

Settings take effect for new runs (the env is materialized onto the worker at run start) and new conversions. Already-running tests are not interrupted.

Environment Variable Overrides

For Docker Compose / Portainer deployments where a worker’s local settings.json is the source of truth (e.g. the gateway is not materializing an env), most fields can be set via environment variables.

The file wins over the environment

The layers merge as hardcoded defaults < environment < settings.json, and they are merged lazily and cached — not resolved once at startup. So an env var sets the value only while the file does not carry that key: once a profile has been saved (or materialized onto the worker by the gateway), the stored value overrides the environment.

If an override "does not take", that is why. Change it in the profile, or clear the key from the file.

Two related behaviours: saving writes only the keys that actually changed, and a profile key left deliberately blank disables the layer beneath it rather than falling through to it.

Not every field has an override. step_delay_ms, sweep_foreign_domains, sweep_domain_allowlist and isp_mode_policy are profile-only.

Field Env variable

Support Portal URL

BASE_URL_SUPPORT

Management Portal URL

BASE_URL_MANAGEMENT

Backend UI URL

FT_PORTAL_URL

TR Emulator URL

EMULATOR_URL

TR Emulator MCP URL

EMULATOR_MCP_URL

ACS URL

TR069_ACS_URL

ACS Username

TR069_ACS_USERNAME

ACS Password

TR069_ACS_PASSWORD

IoT Emulator URL

IOT_EMULATOR_URL

IoT Emulator MCP URL

IOT_EMULATOR_MCP_URL

USP ACS host

USP_ACS_HOST

USP ACS port

USP_ACS_PORT

USP MTP

USP_MTP

USP controller Endpoint ID

USP_CONTROLLER_ENDPOINT

MQTT broker host

MQTT_BROKER_HOST

MQTT broker port

MQTT_BROKER_PORT

MQTT username

MQTT_USERNAME

MQTT password

MQTT_PASSWORD

Username

FT_PORTAL_USER

Password

FT_PORTAL_PASSWORD

BBF Tree MCP URL

BBF_TREE_MCP_URL

Qdrant MCP URL

QDRANT_MCP_URL

Knowledge MCP URL

KNOWLEDGE_MCP_URL

ClickHouse URL

CLICKHOUSE_URL

ClickHouse Database

CLICKHOUSE_DB

ClickHouse User

CLICKHOUSE_USER

ClickHouse Password

CLICKHOUSE_PASS

Platform DB Type

PLATFORM_DB_TYPE

Platform DB Host

PLATFORM_DB_HOST

Platform DB Port

PLATFORM_DB_PORT

Platform DB Name

PLATFORM_DB_NAME

Platform DB User

PLATFORM_DB_USER

Platform DB Password

PLATFORM_DB_PASSWORD

Log SSH Host

LOG_SSH_HOST

Log SSH Port

LOG_SSH_PORT

Log SSH User

LOG_SSH_USER

Log SSH Password

LOG_SSH_PASSWORD

Log Dir

LOG_DIR

Log Error Pattern

LOG_ERROR_PATTERN

Jira Base URL

JIRA_BASE_URL

TestRail URL

TESTRAIL_URL

TestRail Email

TESTRAIL_EMAIL

TestRail API Key

TESTRAIL_API_KEY

TestRail Auto-sync minutes

TESTRAIL_SYNC_INTERVAL

Behaviour Flags (worker environment, not profile fields)

Separate from the settings layer, a set of FT_* variables switches runner behaviour. They are read from the worker’s process environment only — they are not profile fields and do not appear in the Settings screen. The ones worth knowing:

Variable Default Effect

FT_VERIFY_EVIDENCE

on

An LLM PASS that quotes nothing the capture contains is recorded as inconclusive instead of green. Set to 0 to keep the old behaviour — the judge is still asked for evidence, only the consequence changes. See running-tests.adoc#verdicts.

FT_FAILURE_SCREENSHOT

on

Keep the viewport image of the first failing step of a run. Set to 0 to keep none.

FT_STEP_SCREENSHOT

on

Photograph every step with an expectation right after the step. The first inconclusive step keeps its image. The first failing step prefers its own image to the live capture. Set to 0 to switch off the step images and the inconclusive image. The nav script then holds no photograph statement. Each photograph adds a short pause between two steps.

FT_FAILURE_TREE_SNAPSHOT

on

Keep the device parameter tree of a failed run. The runner keeps the tree only when the run applied parameters to the emulator. Set to 0 to keep none.

FT_LLM_DIAGNOSE

off

Enables the failure-diagnosis helper and the whole Learning surface (/api/diagnosis/*). With it off, the Learning screen has nothing to show.

FT_STRICT_VERIFY

off

shadow measures a stricter verify alongside the live one and reports the difference; enforce applies it.

FT_USAGE_LIMIT_GUARD

on

Wait out a spent Claude usage quota instead of abandoning the batch. The wave card and the report header show a PAUSED … quota resumes pill while it waits. FT_USAGE_LIMIT_MAX_WAIT_S caps the wait (default 9 hours).

FT_PROGRESS_HOOK

on

The generated Playwright script reports step progress back mid-segment, so a long navigation segment does not look frozen.

FT_TESTRAIL_TIMEOUT

120 s

Read deadline for every TestRail API call — the time one response may go without sending a byte before the call fails. The connect deadline is the smaller of 10 s and this value. There is no way to switch the deadline off (an unbounded call is what wedged an import): to make it effectively unlimited, set a large number of seconds. A value that is not a positive number is logged and ignored.

FT_TESTRAIL_ATTACHMENT_TIMEOUT

300 s

The same, for downloading or uploading an attachment — a file transfer gets its own, larger read budget. Never smaller than FT_TESTRAIL_TIMEOUT.