Files

53 lines
3.4 KiB
Markdown

# Config Layout
This folder controls environment, login, user, product, and flow selection for regression automation runs.
## Files
- `runtime.json`: the single regression config file. It contains environment settings, active execution settings, users, and product-wise sections such as `IDAS` and `RTM`.
## Main controls
In `runtime.json`:
- `environment.active_environment`: selects `UAT` or `Eastern` for the entire run.
- `environment.portal_environments`: keeps the Pratyay and MCO URLs paired for each environment. Pratyay uses the role-specific exchange/trading-member URL; MCO uses its own portal URL.
- `environment.base_url` and `environment.login_urls`: legacy fallbacks used only when no active portal environment profile is configured.
- `users.mco`: credentials for the MCO portal. These are independent of `users.exchange`, which remains the Pratyay exchange login.
- `IDAS.matching.portals.mco.stage`: currently `login_only`; the MCO test signs in and verifies `/Dashboard/Index` independently from the Pratyay matching flow.
- `IDAS.active_selection.product_code`: the shared product used for bidding, Pratyay bid transfer, and initiate matching. UI suffixes such as `(I)` are resolved automatically.
- `execution.login_role`: `exchange` or `trading_member`.
- `execution.trading_member_key`: which trading member entry from `runtime.json > users.trading_members` should be used.
- `execution.product_family`: product section to load from `runtime.json`, for example `IDAS` or `RTM`.
- `execution.product_code`: selected product code, for example `IDAS1`, `IDAS2`, or `IDAS3`.
- `execution.flow_scope`: `e2e`, `bidding`, `matching`, `reports`, `order_book`, or `trade_book`.
- `users.exchange.username` and `users.exchange.password`: exchange login.
- `users.trading_members.<key>.username` and `users.trading_members.<key>.password`: trading-member login.
- `users.trading_members.<key>.member_id`: trading member / ME instance value used by flows.
- `users.trading_members.<key>.folder_upload_tm_ids`: TM folder names this trading-member login is allowed to upload. Parallel folder upload uses this mapping to choose the right login for each TM folder.
- `IDAS`, `RTM`, and future top-level product sections: product-wise defaults, available codes, supported flows, bidding config, matching config, and future product-specific controls.
Regression config now lives entirely inside `runtime.json`.
## UPC session setup
Session creation uses the root `config.json`, independently of regression settings.
Set `products.UPC.enabled` to `true` to include UPC. Under
`products.UPC.session_variants`, enable all three variants or only the ones required:
| Variant | ME instance ID | UI name |
| --- | --- | --- |
| DAILY | 58 | UPC ANYDAY |
| WEEKLY | 59 | UPC WEEKLY |
| MONTHLY | 60 | UPC MONTHLY |
Each variant has an `enabled` flag. UPC remains disabled by default; all three
variants are preselected for when it is enabled. Set `UPC.run_session` and
`UPC.run_token` to `true` when both session and token creation are required. Each selected variant uses the
existing session creation flow and inherits `setup.session.start_offset_minutes`
and `setup.session.end_time`. Optional `UPC.session` settings override those
defaults, and a variant's `session` settings can override them individually.
Run session-only setup with `python -m pytest tests/setup/sessions/test_session.py`.
Selected UPC cases appear as `UPC_DAILY`, `UPC_WEEKLY`, and `UPC_MONTHLY`.