WebRunner

je_web_runner/utils index

Generated by scripts/gen_utils_index.py; do not edit by hand. 265 subpackages: the core engine, then one section per je_web_runner.api facade theme, then the other feature subpackages.

Core engine

Subpackage Summary
assert_value Result checks behind the assertion actions.
callback Callback executor: run a WR_* command, then a user callback (Observer).
exception WebRunner exception hierarchy and error-message tags.
executor Action executor: resolves WR_* command names and runs action lists (Command).
file_process Directory listing used by the batch runners.
generate_report Report generators: HTML, JSON, XML, JUnit XML and Allure (Strategy).
json Action JSON file read and write, and structure validation before a run.
logging Rotating file logger for WebRunner.
package_manager Loads a package at run time and registers its members as commands (Plugin).
project Project template generator for a new WebRunner workspace.
selenium_utils_wrapper Selenium key and desired-capability tables.
socket_server TCP socket server that runs action JSON sent by remote clients.
test_object Test objects: locator name and strategy pairs (Value Object).
test_record Records executed actions for the reports.
xml XML file read and write, and XML <-> dict conversion.

api.authoring — Façade: action formatter / md authoring / templates / linter / migration.

Subpackage Summary
action_formatter Deterministic formatter for WebRunner action JSON files.
action_templates Reusable parameterised action templates.
bootstrapper Workspace bootstrapper: scaffold a WebRunner starter directory.
md_authoring Author tests in Markdown, transpile to WebRunner action JSON.
sel_to_pw Static translator: common Selenium API calls -> Playwright equivalents.

api.debugging — Façade: cross browser parity / pr comment / extension harness.

Subpackage Summary
cross_browser Cross-browser parity testing: run identical actions and diff results.
extension_harness Browser extension test harness: load extensions, parse manifests, drive popups.
pr_comment GitHub PR comment poster (markdown summary + diff stats).

api.frontend — Façade: device emulation / geo locale / multi-tab / shadow / storybook / state diff / pom codegen / visual review.

Subpackage Summary
device_emulation Device-emulation presets (viewport + UA + DPR + touch).
dom_traversal 穿透 Shadow DOM 與多層 iframe 的輔助命令。
geo_locale Geolocation, timezone, and locale overrides for Selenium / Playwright.
multi_tab Multi-tab orchestration helpers.
pom_codegen Generate Python Page Object modules from a live DOM snapshot.
state_diff Browser state diff: compare cookies + localStorage + sessionStorage snapshots.
storybook Storybook integration: enumerate stories, build per-story action plans.
visual_review Local visual-diff review web UI.
webauthn WebAuthn virtual-authenticator helper via CDP.

api.infra — Façade: driver pin / k8s runner / pipeline / synthetic monitoring / lock / coverage map / impact / diff shard.

Subpackage Summary
coverage_map Coverage map: which action JSON files exercise which URL routes.
driver_pin Pin geckodriver / chromedriver versions in a per-repo file to dodge rate limits.
fanout Fan-out execution: run multiple WR_* actions concurrently in one test.
impact_analysis Test impact analysis: action JSON files → locator/url/template usage map.
k8s_runner Kubernetes Job manifest generator for pod-per-shard parallelism.
pipeline Multi-stage action JSON pipelines with conditional gates.
sharding Diff-aware test selection:只跑被 git diff 影響到的測試。
synthetic_monitoring Synthetic monitoring loop: rerun a curated subset and alert on regression.
test_filter Action 檔的依賴關係:meta.depends_on 宣告,依拓樸排序執行,前置失敗則跳過。
watch_mode File-system watcher that re-runs an action whenever JSON files change.
workspace_lock Workspace lock file: pin Python deps + driver versions + Playwright browsers.

api.mobile — Façade: Appium gestures.

Subpackage Summary
appium_integration Appium 整合:在 Selenium wrapper 上掛上 Appium WebDriver,重用既有指令。

api.networking — Façade: API mock / contract / GraphQL / mock services / HAR replay.

Subpackage Summary
api_mock HTTP route mocking for deterministic e2e tests.
contract_testing Lightweight JSON-schema / OpenAPI response validation.
graphql GraphQL request helper with introspection-aware assertions.
har_replay Local HAR replay server: serve recorded responses from a HAR file.
mock_services Tiny in-process mocks for SMTP / OAuth / S3-compatible storage.

api.observability — Façade: timeline / failure bundle / memory leak / trace / cdp tap / event bus / OTLP.

Subpackage Summary
bidi_backend Unified WebDriver BiDi event/command bridge across Selenium + Playwright.
cdp_tap CDP message tap: record / replay raw Chrome DevTools Protocol traffic.
event_bus File-based pub/sub event bus for cross-shard / cross-process coordination.
failure_bundle Replayable failure bundles: zip up screenshots, DOM, network, console, traces.
memory_leak Memory-leak detection by repeated heap snapshots.
observability Playwright 即時事件擷取:console 訊息與網路回應,附帶斷言輔助。
trace_recorder Playwright tracing wrapper that always produces a debuggable zip.

api.quality — Façade: a11y diff / a11y trend / perf budgets / perf drift / trend / cluster.

Subpackage Summary
a11y_trend Accessibility violations trend over time.
accessibility A11y diff:比較兩次 axe-core 跑完的結果,分出新增 / 修好 / 仍存在三組。
failure_cluster Cluster failed test runs by error signature for triage.
perf_drift Performance baseline drift detector: P95 over a sliding window.
perf_metrics 依路由設定 FCP/LCP/CLS/TTFB 預算,CI 友善的 JSON schema。
trend_dashboard Pass-rate / duration trends pulled from the run ledger.

api.reliability — Façade: retries / locator strength / smart wait / throttler / pool / supervisor.

Subpackage Summary
adaptive_retry Adaptive retry policy aware of the ledger-based flaky classifier.
browser_pool Pre-warmed browser pool with checkout / checkin semantics.
linter Action JSON linter:警告反模式(舊命令名、寫死 URL、危險 script 等)。
process_supervisor Browser process supervisor: kill orphan webdrivers, watchdog timeouts.
smart_wait Smart wait helpers: SPA route stable + network idle.
throttler Cross-shard concurrency throttling using filesystem semaphores.
Subpackage Summary
cookie_consent Auto-dismiss helpers for common GDPR / cookie consent banners.
csp_reporter CSP violation reporter (collector + assertions).
header_tampering Per-request header tampering for security testing.
license_scanner SPDX license header scanner for JS / CSS bundles.
pii_scanner PII / privacy scanner for screenshots OCR text and HAR / network bodies.

api.test_data — Façade: DB fixtures / fixture record / form autofill.

Subpackage Summary
database 資料庫驗證工具:透過 SQLAlchemy 連到後端,斷言查詢結果。
form_autofill Heuristic form auto-filler: match fields by label/placeholder/name.
snapshot Record / replay fixture:第一次跑記錄回應,之後拿來當 fixture。

Other feature subpackages

Subpackage Summary
ab_run A/B 模式:同一份 action 對兩個環境各跑一次,回傳逐步比對結果。
action_refactor_suggester Suggest refactors to a WebRunner action JSON list.
ai_assist LLM-輔助:可插拔的 LLM caller,供 self-healing 與 NL 測試生成使用。
api 基於 requests 的 HTTP 測試命令,供 action JSON 與瀏覽器流程混用。
api_version_compat Old client × new server backward compatibility verifier.
auth OAuth2 / OIDC 登入流程:client_credentials / password / refresh_token。
backend_log_correlator 用 otel_bridge 注入的 traceparent,把後端 log 拉進 failure bundle。
background_sync_assert Background Sync API assertions.
bidi W3C WebDriver BiDi Network 模組薄包裝 (Selenium 4.16+)。
bug_repro_stability 重複跑同一個失敗 test N 次,報告重現率 — 區分 deterministic vs flaky bug。
bundle_budget 每頁 JS / CSS / image / font 載入大小預算 + 違規清單。
bundle_diff_pr PR 級 bundle size delta 報告。
cdp 原生 Chrome DevTools Protocol (CDP) 命令直通,給進階情境用。
chaos_hooks 在 action 流程中隨機注入混亂條件:網路斷線、CPU 節流、中途 reload。
chrome_profile 持久化 Chrome profile:snapshot → 跑 → sync-back 模式 + SingletonLock 清理 + stealth flag。
ci_annotations GitHub Actions 行內註解產生器:把失敗轉成 ::error:: 訊息。
cli WebRunner CLI 進入點,提供執行、驗證、平行、報告等子命令。
clickjacking_audit X-Frame-Options / CSP frame-ancestors 驗證 + iframe 嵌入探測。
cloud_grid 雲端 Grid 接入:BrowserStack / Sauce Labs / LambdaTest 的 Remote driver 建構器。
commit_msg_trigger Commit-message trigger parser & dispatcher.
compression_streams CompressionStream / DecompressionStream round-trip verification.
compute_pressure Compute Pressure API simulation + app-throttle reaction assertions.
consent_audit GDPR / CCPA 風格 cookie 分類 + 偵測 pre-consent 載入的 non-essential cookies。
console_error_budget 追蹤 JS console errors / unhandled rejections,設立可調的「錯誤預算」。
cookie_chips_audit CHIPS (Cookies Having Independent Partitioned State) compliance auditor.
cookie_scope_abuse Cookie domain / path scope abuse detection.
cookie_store_api Async cookieStore API helper:harvest + assert + subscribe / change-event
coop_coep_audit COOP / COEP / CORP cross-origin isolation header 稽核。
cors_matrix 完整 verb × origin × credentials CORS preflight + simple-request 矩陣探測。
credential_management Credential Management API mock.
critical_css_audit Critical-CSS inline audit.
cross_tab_sync 跨 tab / context 狀態同步測試:BroadcastChannel / localStorage /
csp_violation_parser Content Security Policy violation report parser & classifier.
dashboard 即時 progress dashboard:簡單 HTTP server,瀏覽器可直接看到執行進度。
data_driven 資料驅動測試:以 CSV / JSON 表格逐列展開 ${ROW.col} 占位符並執行 action。
db_snapshot Per-test DB savepoint/rollback isolation, decoupled from the actual driver.
device_cloud Real-device 雲端連線:在既有 cloud_grid 上補上行動裝置 caps、session
docs 自動產生 WR_* 命令參考(Markdown)。
dom_xss_taint DOM-based XSS taint tracking (lightweight, heuristic).
download_verify 下載檔案驗證:PDF/CSV/Excel/JSON/檔名/SHA256 比對,給 E2E 測試用。
driver_dispatch Shared Selenium / Playwright JS execution dispatch.
dst_boundary_test DST (Daylight Saving Time) boundary test harness.
edge_case_generator AI 邊界案例產生器:從 passing test 出發,LLM 列出 boundary / 異常 / race / unicode
email_deliverability Email deliverability header audit.
email_render 攔截應用寄出的 email,渲染 HTML 與跨 client 截圖比對。
env_config 依環境別載入 .env 檔,並在 action JSON 中展開 ${ENV.KEY} 占位符。
exploratory_ai 代理式探索測試員:LLM 主動決定下一步點哪、輸入甚麼,過程中蒐集 bug 報告線索。
extensions 瀏覽器擴充功能載入:Chrome / Edge 系列接受 .crx 檔或解壓的目錄。
factories Factory 樣板:可組合的測試 entity 產生器(user / order / product)。
failure_auto_tag Heuristic + LLM-assisted failure auto-tagger.
failure_cluster_dbscan Failure-message clustering for root-cause grouping.
failure_narrator LLM 從 failure_bundle 寫出自然語言的「為什麼這個 test 失敗了」報告。
failure_triage AI 失敗根因分析:把 failure_bundle / cluster signature / 最近動作 餵給 LLM,
file_system_access 模擬 File System Access API:showOpenFilePicker / showSaveFilePicker。
file_transfer 檔案上傳 / 下載輔助工具。
flag_matrix Feature flag 組合矩陣執行,自動剪掉冗餘 / 不可能組合。
flake_detector Flaky test 偵測 + 自動隔離。
flakiness_graveyard Flakiness graveyard registry.
font_loading_strategy Font loading strategy verification.
forced_colors_mode High-contrast / dark-mode / reduced-motion / forced-colors 矩陣驗證。
git_bisect_flake 自動 bisect ledger,找出造成某 test 開始失敗的 regression commit。
graphql_n_plus_1 N+1 query detector for GraphQL operations.
grpc_streaming_assert gRPC streaming assertion helpers.
grpc_tester gRPC / gRPC-Web client harness with request/response capture for E2E
hallucination_probe Hallucination probe — a structured way to measure how often a model
har_diff HAR 檔案差異比對:用 (method, url) 作 key,回傳新增 / 移除 / 狀態碼變動。
har_to_openapi HAR → OpenAPI 3.x reverse-engineering.
hsts_preload_audit HSTS preload list compliance auditor.
hydration_check SSR hydration mismatch 偵測。
hydration_streaming Streaming SSR (React 18 Suspense / Astro / Solid) per-boundary 抵達時序。
idempotency_check 同一個請求送兩次,結果應相同(訂單 / 付款 / POST /transfer 最常見 bug)。
inbox_render_outlook Multi-client email render compatibility audit (Outlook, Gmail, Apple Mail).
indexed_db_explorer IndexedDB 內容快照 + 物件 / store / index 斷言。
inp_tracker Interaction to Next Paint (INP) tracker。INP 是 Google 2024 取代 FID 的
lcp_image_audit LCP image preload audit.
lighthouse Lighthouse 跑分器:呼叫官方 lighthouse Node CLI,回傳分數摘要。
lighthouse_regression Lighthouse score regression tracker.
live_dashboard Live Dashboard:把既有 run_ledger / flake_detector / locator_health /
llm_token_cost_tracker Per-test LLM token & dollar cost tracker.
load_test 把 HTTP action 餵進 Locust 跑壓力測試。
locator_hardener 讀脆弱 locator(來自 locator_health 報告)+ 周圍 DOM,LLM 建議更穩的 selector。
locator_health Locator 健康度報告 + 自動升級建議。
long_animation_frame Long Animation Frame (LoAF) API。 Chrome 在 2024 推出的新觀測 API,取代
memory_pressure_emulate 透過 CDP 降低硬體並發數 / 注入 memory-pressure 訊號,讓 suite 在低資源
mixed_content_audit 偵測 HTTPS 頁面內載入的 HTTP 資源(瀏覽器靜默 block,平常測不出來)。
mq_assert Message-queue assertion helpers (Kafka / RabbitMQ / SQS-style).
multi_user Multi-user matrix:同一份 action 對 N 位使用者 / 角色逐一執行並比對。
multimodal_qa 給 vision LLM 看截圖 + 問題,解析「對嗎?」的結構化回答。
mutation_testing Mutation testing for action JSON:對 action 套用變異後執行,反向驗證測試本身的偵測能力。
network_emulation 網路節流預設集:在 CDP 上模擬 3G / Fast 3G / 4G / WiFi / Offline 等情境。
notifications_audit 追蹤 Notification.requestPermission() 的呼叫時機 + 顯示的 notifications。
notifier 跑完測試後發送結果摘要到 Slack / 通用 webhook。
number_currency_locale Number / currency / date locale-format assertion helpers.
oauth_pkce_replay 重放 OAuth state / PKCE code_verifier,確認 authorization server 真的拒
ocr_assert Canvas / WebGL / 圖片內文字 OCR 斷言。補 visual_ai 只做感知雜湊的缺口
open_redirect_detector 偵測 ?redirect= / ?next= / ?return_to= 類參數的 open-redirect 弱點。
openapi_drift Live-API vs OpenAPI spec drift detector.
openapi_to_e2e OpenAPI / Swagger → WebRunner action JSON generator。
otel_bridge 把 OpenTelemetry 的 trace context 注入到瀏覽器發出的 HTTP request header,
otp_interceptor OTP / Email / SMS 攔截器:整合 MailHog / Mailpit / IMAP / 自建 webhook,
pagination_audit 遍歷所有頁,斷言無重複 / 無遺漏 / cursor 穩定。
payment_request_assert Payment Request API + Apple Pay / Google Pay sheet assertions.
persona_runner Persona matrix: 同一份 suite × N 種角色(admin / free / enterprise / guest)。
pii_in_screenshot Screenshot 內個資掃描:OCR → regex,抓出截圖意外洩漏的 email / 信用卡 / 身分證等。
pip_assert Picture-in-Picture (video + Document PiP) assertions.
pom_generator Page Object Model 骨架產生器:解析 HTML,輸出可調整的 Python POM 類別。
popover_assert <dialog> / popover open-close / invoker-binding assertions.
pr_risk_score 融合 flake / impact / locator_health / coverage 訊號,給 PR 一個 0-100 風險分數。
pr_title_generator Suggest a Conventional-Commits PR title from a diff or commit history.
pre_merge_gate_dsl Declarative pre-merge gate DSL.
prompt_drift_monitor 追蹤 app 內 LLM 輸出隨時間飄移。
prompt_injection_scanner 餵 jailbreak / prompt-injection payloads 給 app 內 LLM,評估洩漏風險。
pseudo_localization 字串 → pseudo-localised 變體,專抓 hard-coded text、截斷、RTL bug。
pull_to_refresh Pull-to-refresh / overscroll-behavior assertions for PWAs.
push_delivery FCM / APNs push-payload validator.
quarantine_age_report Quarantine 條目加上 age + 自動 escalation tier。
rag_grounding_assert RAG grounding assertions.
rate_limit_assert HTTP rate limit / 429 / Retry-After verifier.
recorder 透過注入 JS 監聽器的瀏覽器操作錄製器,將使用者點擊與輸入反向轉成 WR_* action JSON。
replay_studio Replay studio:把 record list + 失敗截圖串成單一 HTML 時間軸。
repro_minimizer 把失敗的 action list 縮到最小可重現 — delta-debugging (ddmin) 演算法。
resource_hints_audit Resource hints (preload / prefetch / preconnect) actually-used auditor.
rtl_layout_verify RTL (right-to-left) layout sanity verification for Arabic / Hebrew /
run_ledger 失敗分類器:把錯誤訊息與 ledger 歷史對映到 transient / flaky / environment / real。
sbom_diff SBOM (Software Bill of Materials) diff for PRs.
scheduler 排程執行:依固定間隔重跑 action JSON 檔。
schema Action JSON Schema 匯出:給 IDE 做語法高亮 / 自動補完。
screen_reader_runner 從 accessibility tree 模擬 NVDA / VoiceOver 朗讀順序與斷句。
secrets_scanner 靜態掃描 action JSON 內常見的硬編密碼 / token。
security_headers HTTP 安全 header 稽核:對給定的 headers 或 URL 檢查常見的硬性建議項目。
self_healing 自我修復定位器:當主要 TestObject 找不到元素時,依序嘗試已註冊的備援。
service_worker Service Worker 與 Cache Storage 控制:避免 SW 干擾測試。
session_to_test 把 rrweb / 通用 session event 串流轉成 WR action JSON。
sla_tracker SLA 達成率追蹤:「Y% 的 suite 在 X 分鐘內跑完」加趨勢。
slack_digest 週報 / 日報:quarantine 進出、top-risk PR、flake 趨勢、cost 變化,推到 Slack / Teams。
snapshot_diff_approval Visual / text snapshot diff + approval workflow.
speculation_rules Speculation Rules (prerender / prefetch) hint verification.
speech_api_assert Web Speech API mock + assertion helpers.
sri_verify Subresource Integrity (SRI) hash 缺失偵測 + 正確性驗證。
sse_assert Server-Sent Events stream assertions, 對稱 websocket_assert 的姊妹模組。
storage 瀏覽器端 Storage 操作命令:local/session storage 與 IndexedDB 清除。
storage_buckets Storage Buckets API — partitioned-storage isolation verification。
story_to_actions 從使用者故事 / Figma frame metadata 產生 WR action JSON。
streaming_chat_assert Token-by-token streaming chat assertions.
test_auto_repair AI 測試自動維修:把失敗訊號 + git diff + 既有 action JSON 餵 LLM,
test_blame_owner Test-blame ownership lookup.
test_categorizer 從 action JSON 自動標記 smoke / regression / perf / security / a11y / data。
test_cost_estimator 每個 suite 的雲端費用 / 分鐘數 / CO₂ 估算。
test_data Faker 整合:產生隨機 email / 姓名 / 地址等假資料。
test_debt_dashboard 盤點 skipped / xfail / TODO 測試項目,附帶 age + owner。
test_dedup_ai Embedding-based action JSON 語意去重。
test_dup_dry Test code DRY-checker.
test_management JIRA Cloud REST API 整合:建立 issue 與將失敗自動回報。
test_naming_lint Test-naming convention linter.
test_owners_map CODEOWNERS-style file → test → team 對映表。
test_roi_scorer Test ROI (return-on-investment) scorer.
test_scheduler Test scheduling 最佳化:給 CI 分鐘 + cloud session 預算,挑出 value-density
test_self_describe Reverse-engineer a human description of what a JSON action script does.
testcontainers_integration testcontainers 整合:以 Python 啟動暫存的 Postgres / Redis / 通用 Docker container。
third_party_block_test 逐個 block 第三方 vendor,觀察主要流程是否還能跑完(availability threat
third_party_budget 第三方腳本數量 / 重量 / 阻塞時間預算。
three_d_secure_flow 3-D Secure 2.x flow path assertions.
time_freezer 透過 CDP 注入腳本,凍結 / 撥動瀏覽器內的 Date.now、Date()、performance.now。
tls_cipher_audit TLS cipher / version / OCSP-stapling audit.
token_leak_detector 掃描 response body / HAR / log,抓 JWT、API key、AWS key、session token 等洩漏。
tool_call_assert LLM tool / function-call assertions.
touch_gesture Touch gesture sequence builder + assertion helpers.
view_transitions 驗證 View Transitions API 動畫順利完成且未造成 layout shift。
viewport_audit Viewport meta + safe-area + notch handling audit.
virtual_keyboard Virtual (on-screen) keyboard show/hide impact assertions.
visual_ai 感知雜湊(perceptual hash)+ 簡化 SSIM 視覺比對,給 Canvas / WebGL / 圖表
visual_regression 視覺回歸比對工具:擷取目前頁面截圖並與基準圖比較差異。
wake_lock_assert Screen Wake Lock API assertions.
walkthrough_docs AI 走查文件產生器:從跑過的 test(actions + screenshots)生 step-by-step
wcag22_touch_target WCAG 2.2 SC 2.5.8 (Target Size — Minimum, AA) auditor.
web_locks Multi-tab Web Locks 競爭測試 harness。
web_push_assert Web Push (VAPID) subscription & delivery assertions.
web_share_assert navigator.share assertions.
webauthn_mock WebAuthn / FIDO2 / Passkey mock.
webcodecs_assert WebCodecs verification helpers.
webgpu_pixel_verify WebGPU-canvas pixel verification.
webhid_mock WebHID mock — install a navigator.hid shim in the page so tests can
webhook_receiver 跑一個臨時 HTTP server,接 app 寄出的 webhook 並做斷言。
webhook_signature_verify Webhook signature verifier covering the common providers.
webrtc_assert PeerConnection 狀態 / ICE / track / RTP stats 斷言。
webserial_mock Web Serial API mock — emulate a UART so tests can stream lines into a
websocket_assert 記錄 WebSocket frames + 對 frame pattern / count / message shape 做斷言。
webtransport_assert HTTP/3 WebTransport stream assertions — 對齊 websocket_assert 與
webusb_mock WebUSB mock — install navigator.usb shim with configurable control