test(应用与系统): 添加组件验收流程与复测报告

提供 13 组、74 个用例,覆盖 49 项可执行组件。
新增隔离运行、真实界面检查、结果汇总和安全安装脚本。
升级仅覆盖未修改的测试模板,并保留原文件备份。
为手动操作设置保护开关,保留修复前后验证证据。

验证:43 项相关检查、类型检查与构建通过。
This commit is contained in:
liuwenxin committed 2026-11-02 09:06:40 +08:00
1 parent 5f9e28715c
commit d489288c8e
22 files changed
+19289 -1

No files matched your search

+106
View File
@@ -0,0 +1,106 @@
# 应用与系统组件测试
本流程包覆盖“可执行 → 应用与系统”的 **49 个组件 ID**,分为 13 个任务、74 个用例。同名组件的不同版本分别统计。11 个待接入组件不计入验收。
测试发现的 PID 空结果、类型判断/转换、毫秒等待、按模式校验参数、命令行编码及 BAT 路径问题现已修复。绿色运行状态仅表示引擎没有抛出异常;本流程还会核对实际值、返回类型、进程状态和等待耗时。
## 在当前应用中使用
1. 返回左侧“编排”首页,点击任务列表右上角的刷新按钮。
2. 搜索“组件测试”,打开所需任务并点击“编辑流程”。
3. 先使用 01~07 组。运行后打开底部“运行日志”,搜索“用例结果”或查看末尾的“本组汇总”。
4. 每条用例结果依次为:`[用例编号, 组件 ID, 状态, 输入, 预期, 实际]`。
5. 状态 `PASS` 是通过,`FAIL` 是失败,`BLOCKED` 是缺少条件或无法校验,`MANUAL` 是待人工确认。有任一未通过项目,任务最终显示“失败”,详细原因以用例结果为准。
01~07 组现可自动验证;类型选项使用明确的语义值,07 组只填写当前命令模式需要的参数。实际结果见本包的最新报告,修复前的失败证据另行保留。
## 分组与预期
| 组 | 测试目标 | 关键输入与验收条件 |
|---|---|---|
| 01 · 应用与 PID | 5 个组件,8 个用例 | 生成唯一 `rpatest_` 程序,启动两个实例;返回 PID 与列表应匹配;两个关闭组件各关闭一个实例;无匹配时应返回 `null` / `[]`。 |
| 02 · 数据转换 | 6 个组件,10 个用例 | `"123.5" → 123.5`、`"-42.25" → -42.25`、`-3.9 → -3`、真假布尔值、`42 → "42"`;通用转换分别检查数值、整数、布尔和文本。 |
| 03 · 数据判断 | 6 个组件,12 个用例 | 对象与数组、数字与中文、`null` / 空文本 / `0`、真实数组与文本 `"[]"`;“判断数据类型”按目录契约应返回布尔值。 |
| 04 · 变量与配置 | 7 个组件,10 个用例 | 中文变量、整数和列表、深复制内容及引用独立、当前流程 ID、自定义配置命中与未命中、计数 `10 → 12 → 14`。 |
| 05 · 等待与随机数 | 5 个组件,7 个用例 | 三个等待组件按独立毫秒时钟测量;毫秒版本设置 `3000`,预期 `2800~6500 ms`;随机整数包含 `min=max=7` 与负数范围,小数应处于 `[0,1)`。 |
| 06 · 系统路径与环境变量 | 5 个组件,7 个用例 | 与 Windows 独立查询的临时、用户、桌面路径比较;只读写专用变量 `RPA_APP_SYSTEM_TEST_VALUE`,结束恢复原先读到的值。 |
| 07 · 命令行 | 2 个组件,5 个用例 | PowerShell 中文固定输出;DOS、BAT、PowerShell 三种 V1 模式;非零退出码应报错。只校验当前模式的参数,另有含中文和空格 BAT 路径的回归测试。 |
| 08 · Windows 凭据【手动】 | 3 个组件,3 个用例 | 仅操作唯一新建测试目标。缺少安全的秘密输入机制,默认阻塞,不能把真实密码填进流程。 |
| 09 · 输入法【手动】 | 2 个组件,3 个用例 | 读取、切换到 `en-US`、尝试恢复原状态;必须人工核对前台窗口与任务栏,子进程返回成功不算通过。 |
| 10 · 音频【手动】 | 1 个组件,1 个用例 | 使用自制 0.3 秒、440 Hz 低音量 WAV;人工确认确实听到声音。 |
| 11 · 屏保【手动】 | 3 个组件,4 个用例 | 两个开启版本分别配对关闭,需观察实际屏保;V1 按 Windows 已有屏保设置运行,已去掉未实现的自定义文字、效果和密码参数。 |
| 12 · 锁屏与解锁【手动】 | 2 个组件,2 个用例 | 锁屏仍要求账户等参数,该组保持阻塞。原“屏幕解锁”已明确标为“唤醒屏幕(非登录解锁)”,无需账号密码,不支持 Windows 登录解锁。 |
| 13 · 远程桌面【手动】 | 2 个组件,2 个用例 | 填写自己的测试地址,人工完成登录并验证目标;`tsdiscon` 可能断开当前会话,关闭操作有独立开关。 |
## 手动测试的执行开关
08~13 组不会由自动脚本执行。任务中名为“手动执行开关”的初始化节点,默认值是布尔 `false`。
只有确认该组的运行环境、影响和恢复方式后,才把该节点的“值”改为 `${true}`。恢复关闭使用 `${false}`。不要填写普通文本 `true` / `false`,保护条件只接受真正的布尔值。
- **08 组和 12 组的锁屏节点**:当前没有不会把秘密写入流程或 `run.json` 的输入途径,因此保持阻塞;不要填 Windows 登录密码,不创建、覆盖或删除已有业务凭据。“唤醒屏幕”本身已无需任何凭据,可在单独任务中测试。
- **09 组**:先准备一个没有未保存内容的文本编辑窗口,人工记录原输入法,执行后核对是否真的切换并恢复。异常时人工切回原状态。
- **10 组**:确认音量和输出设备后,只播放本包的短测试音。
- **11 组**:需人在机器旁,有办法手动退出屏保;只调用 Windows 已配置的屏保,不设置自定义解锁密码。旧节点若保留 `set_password=1`,会在桌面操作前给出明确错误,可删除该旧节点后重新添加。
- **12 组**:实际锁屏须先明确确认影响和恢复方式,人在机器旁并能正常用 Windows 登录;不能测试自动输入登录密码。
- **13 组**:先设置“填写用户自己的测试远程地址”。连接成功须人工确认,启动 `mstsc` 不算已经登录。断连还要求“断连单独开关”为 `${true}`,必须另行确认操作的是哪个会话及如何重新连接。确认前保持 `${false}`。
人工项目即使组件返回成功,也继续显示 `MANUAL`,本工具不会自动写成通过。人工证据请附实际观察、时间和必要截图,不能仅记录返回标志。
## 安装、校验与报告命令
在项目根目录运行:
```powershell
# 校验 13 组 / 49 项覆盖、连接关系及现有运行前校验
node scripts/app-system-tests.mjs verify
# 安装到当前用户:只新增;同 ID 已存在则跳过,保留用户修改
node scripts/app-system-tests.mjs install --user-data "$env:APPDATA\rpa-studio"
# 重建仓库里的流程 JSON;不会覆盖应用中已安装的任务
node scripts/app-system-tests.mjs generate
# 构建后,在全新的 Electron 用户目录运行非手动任务
npm run build
node scripts/app-system-tests.mjs run-safe
# 同时用临时可见的独立 Electron 窗口验证下拉选项、模式切换和唤醒提示
node scripts/app-system-tests.mjs run-safe --ui-check
# 从本次真实证据重新生成报告
node scripts/app-system-tests.mjs report
```
安装默认使用 `%APPDATA%\rpa-studio`;非标准用户目录需要显式传入 `--user-data`。重复安装不会覆盖已有测试任务,也不改变用户原有任务。
`run-safe` 退出码:`0` 表示报告没有失败或阻塞,`2` 表示存在失败或阻塞(包含手动任务缺少前置条件),`1` 表示工具自身异常。报告和原始事件保存在项目的 `test-output/app-system/`,该目录已由现有 `.gitignore` 忽略。
每次自动运行保留独立 Electron 用户目录及 `runs/<runId>/run.json`,测试不会占用当前日常实例,也不会把隔离验证结果伪装为用户任务列表中的运行历史。任务列表的新任务初始仍显示“尚未运行”。
## 边界与恢复
- 测试进程名称和可执行路径唯一,两个关闭组件只操作新建夹具 PID。常规异常后仍执行专用进程清理;中止流程可能跳过收尾,夹具会在 90 秒内自动退出。
- 临时文件仅写入系统临时目录下的新建 `RPA-AppSystem-Tests` 子目录,保留供排查,不批量删除文件。
- 环境变量组件只操作当前应用进程,不修改 Windows 用户/系统环境变量。本包恢复原读取值;原本不存在时只能恢复为空文本,当前组件不支持删除进程内变量,退出应用后消失。隔离运行预设原始值并验证恢复。
- 凭据、输入法、屏保、锁屏、远程会话均未在自动验收中改变。
- 缺少类型选项映射、真实桌面观察或测试远程主机时,状态保持阻塞或待人工确认。
## 修复结果与保留的限制
- PID:无匹配返回 `[]` / `null`,过滤空行、零和无效 PID。
- 类型判断:按目标类型返回布尔值;数值类型与数字文本分开判断。
- 类型转换:使用 `number`、`int`、`bool`、`string` 选项,输入无效时报错。历史默认值 `1` 兼容数值类型;其他数字别名为本项目明确规定的兼容值,前端统一使用语义值。
- 等待:毫秒组件读取 `mileSecond`,其他秒制等待组件保持秒制;支持取消,拒绝超出计时器范围的值。
- 关闭程序:PID/名称模式分别显示并校验参数;无效 PID 不会降级成按名称批量关闭。名称模式尊重“关闭所有会话”选项,并排除 RPA Studio 主进程。
- 命令行:DOS/BAT/PowerShell 分别校验,修复中文输出编码和含空格、中文 BAT 路径的引号处理。
- 屏保 V1:仅提供实际实现的系统屏保入口,不再要求自定义密码,也不展示未实现的自定义效果。
- 原“屏幕解锁”:名称改为“唤醒屏幕(非登录解锁)”,不收集账号密码,返回 `loginUnlockSupported:false`;本人仍需完成 Windows 登录。
目录修正保存在 `resources/catalog-overrides.json`,重新生成目录也会应用;不会恢复错误的下拉选项或密码字段。
安装仍只新增、不覆盖已有任务。需要升级本包旧任务时,使用 `upgrade --baseline <升级前的模板目录>`;仅升级仍匹配旧模板的任务,并备份原文件,用户修改过的任务会跳过。
输入法、音频、屏保、锁屏和远程桌面仍需要人工证据或专门环境,不自动执行高影响操作。输入法子进程实现和 `tsdiscon` 会话语义不在本轮 9 项修复范围内。
最新逐用例证据见 [REPORT.md](REPORT.md),修复前证据见 [REPORT-before-fix.md](REPORT-before-fix.md)。
@@ -0,0 +1,153 @@
# 应用与系统组件测试报告
记录时间:2026年10月30日 16:52:04(北京时间)。覆盖 49 项可执行组件,13 组任务。
按组件统计:通过 29,失败 4,阻塞 11,待人工确认 5,未运行 0。
状态依据是断言、前置校验和人工证据,节点执行成功不直接代表功能通过。未执行手动系统操作。
| 组 | 组件 ID | 名称 | 状态 |
|---|---|---|---|
| 01 | App_Run | 启动应用程序 | 通过 |
| 01 | App_GetPid | 获取一个匹配PID | 失败 |
| 01 | App_GetPids | 获取全部匹配PID | 失败 |
| 01 | App_Kill | 关闭应用程序 | 通过 |
| 01 | App_KillV1 | 关闭应用程序 | 通过 |
| 02 | Basic_StringToNum | 将文本转换为数字 | 通过 |
| 02 | Basic_ConvertNumber | 数据转为数值类型 | 通过 |
| 02 | Basic_ConvertInt | 数值转为整数类型 | 通过 |
| 02 | Basic_ConvertBool | 数据转为布尔类型 | 通过 |
| 02 | Basic_ConvertString | 将数字转换为文本 | 通过 |
| 02 | Basic_DataTypeConversion | 转换数据类型 | 阻塞 |
| 03 | Basic_IsDictionary | 判断数据是否为字典 | 通过 |
| 03 | Basic_IsNumber | 判断数据是否为数值 | 通过 |
| 03 | Basic_IsNull | 判断数据是否为空 | 通过 |
| 03 | Basic_IsArray | 判断数据是否为数组 | 通过 |
| 03 | Basic_Type | 获取数据类型 | 通过 |
| 03 | Basic_JudgeDataType | 判断数据类型 | 失败 |
| 04 | Basic_SetVariable | 设置变量 | 通过 |
| 04 | Basic_SetVariable_V1 | 设置变量 | 通过 |
| 04 | Basic_Clone | 复制数据 | 通过 |
| 04 | Basic_GetProcessInfo | 获取流程信息 | 通过 |
| 04 | Basic_DebugOutput | 调试输出 | 通过 |
| 04 | CustomConfig_GetConfig | 自定义配置 | 通过 |
| 04 | Basic_BusinessOrderCount | 业务办理计数 | 通过 |
| 05 | Basic_Delay_V2 | 等待 | 通过 |
| 05 | Basic_Delay_V1 | 等待 | 通过 |
| 05 | Basic_Delay | 流程延迟执行 | 失败 |
| 05 | Basic_RandomInt | 生成随机数 | 通过 |
| 05 | Basic_Rnd | 生成随机数 | 通过 |
| 06 | System_GetTempPath | 获取临时文件夹路径 | 通过 |
| 06 | System_GetHomePath | 获取用户文件夹路径 | 通过 |
| 06 | System_GetSystemPath | 获取系统文件夹路径 | 通过 |
| 06 | System_GetEnv | 获取环境变量 | 通过 |
| 06 | System_SetEnv | 设置环境变量 | 通过 |
| 07 | System_ExecuteCommand | 执行命令行 | 阻塞 |
| 07 | System_ExecuteCommandV1 | 执行命令行 | 阻塞 |
| 08 | System_AddCredential | 添加Windows凭据 | 阻塞 |
| 08 | System_ReadCredential | 获取Windows凭据 | 阻塞 |
| 08 | System_DeleteCredential | 删除Windows凭据 | 阻塞 |
| 09 | System_GetInputMethodState | 获取输入法状态 | 待人工确认 |
| 09 | System_SetInputMethodState | 设置输入法状态 | 待人工确认 |
| 10 | System_PlaySound | 播放音频 | 待人工确认 |
| 11 | System_ScreenSaverShow | 开启屏保 | 阻塞 |
| 11 | System_ScreenSaverShowV1 | 开启屏保 | 阻塞 |
| 11 | System_ScreenSaverStop | 关闭屏保 | 阻塞 |
| 12 | ScreenControl_Screenlock | 屏幕锁屏 | 阻塞 |
| 12 | ScreenControl_ScreenUnlock | 屏幕解锁 | 阻塞 |
| 13 | System_ConnectRemoteDesktop | 连接远程桌面 | 待人工确认 |
| 13 | System_CloseRemoteDesktop | 关闭远程连接 | 待人工确认 |
## 用例证据
| 用例 | 组件 | 状态 | 预期 | 实际/原因 |
|---|---|---|---|---|
| 01-01 | App_Run | 通过 | 第一个测试进程 PID 大于 0 | 37796 |
| 01-02 | App_Run | 通过 | 第二个 PID 大于 0,且与第一个不同 | 48484 |
| 01-03 | App_GetPid | 通过 | 返回本次创建的任一 PID | 37796 |
| 01-04 | App_GetPids | 通过 | 列表恰含本次创建的两个 PID | [37796,48484] |
| 01-05 | App_Kill | 通过 | 结束第一个夹具 PID,第二个仍在运行 | [37796,false,true] |
| 01-06 | App_KillV1 | 通过 | 结束第二个夹具 PID | [48484,false] |
| 01-07 | App_GetPids | 失败 | 所有夹具结束后应返回空数组 [] | [0] |
| 01-08 | App_GetPid | 失败 | 无匹配时应返回 null | 0 |
| 02-01 | Basic_StringToNum | 通过 | 数字 123.5 | 123.5 |
| 02-02 | Basic_ConvertNumber | 通过 | 数字 -42.25 | -42.25 |
| 02-03 | Basic_ConvertInt | 通过 | 整数 -3(向零截断) | -3 |
| 02-04 | Basic_ConvertBool | 通过 | 布尔 true | true |
| 02-05 | Basic_ConvertBool | 通过 | 布尔 false | false |
| 02-06 | Basic_ConvertString | 通过 | 文本 "42" | "42" |
| 02-07 | Basic_DataTypeConversion | 阻塞 | 按目标类型转换;先确认目录中目标类型编号映射 | "42";目录没有目标类型选项映射,不能猜测编号;当前实现也未读取 into_type。 |
| 03-01 | Basic_IsDictionary | 通过 | true | true |
| 03-02 | Basic_IsDictionary | 通过 | false | false |
| 03-03 | Basic_IsNumber | 通过 | true | true |
| 03-04 | Basic_IsNumber | 通过 | false | false |
| 03-05 | Basic_IsNull | 通过 | true | true |
| 03-06 | Basic_IsNull | 通过 | true | true |
| 03-07 | Basic_IsNull | 通过 | false | false |
| 03-08 | Basic_IsArray | 通过 | true | true |
| 03-09 | Basic_IsArray | 通过 | false | false |
| 03-10 | Basic_Type | 通过 | "list" | "list" |
| 03-11 | Basic_Type | 通过 | "null" | "null" |
| 03-12 | Basic_JudgeDataType | 失败 | 返回布尔判定结果(true 或 false),不是类型名称 | "number" |
| 04-01 | Basic_SetVariable | 通过 | 原值及输出变量均保持中文文本 | "中文变量往返" |
| 04-02 | Basic_SetVariable_V1 | 通过 | 数字 42 | 42 |
| 04-03 | Basic_SetVariable_V1 | 通过 | 数组 [1,2] | [1,2] |
| 04-04 | Basic_Clone | 通过 | 深复制内容相同,外层和嵌套对象均不共用引用 | {"title":"中文","nested":{"n":1}} |
| 04-05 | Basic_GetProcessInfo | 通过 | 当前流程 ID、名称、运行 ID 和节点数一致 | {"id":"test_appsystem_04","name":"组件测试 04 · 变量与配置","description":"查看运行日志中的用例结果;有失败时任务最终显示失败,其他用例仍继续。","enabled":true,"trigger":{"type":"manual","label":"手动运行"},"version":"0.1.0","createdAt":"2026-10-30T00:00:00.000Z","updatedAt":"2026-10-30T00:00:00.000Z","nodeCount":99,"runId":"run_mvuqh8oe_gmpo"} |
| 04-06 | Basic_DebugOutput | 通过 | 日志及返回值为“中文日志测试:42” | "中文日志测试:42" |
| 04-07 | CustomConfig_GetConfig | 通过 | 数字 30 | 30 |
| 04-08 | CustomConfig_GetConfig | 通过 | 未命中返回 null | null |
| 04-09 | Basic_BusinessOrderCount | 通过 | 首次计数 12 | 12 |
| 04-10 | Basic_BusinessOrderCount | 通过 | 同一流程再次计数 14 | 14 |
| 05-01 | Basic_Delay_V2 | 通过 | 实际等待耗时 120~1800 ms | 161 |
| 05-02 | Basic_Delay_V2 | 通过 | 实际等待耗时 80~1800 ms | 186 |
| 05-03 | Basic_Delay_V1 | 通过 | 实际等待耗时 120~1800 ms | 156 |
| 05-04 | Basic_Delay | 失败 | 实际等待耗时 2800~6500 ms | 1013 |
| 05-05 | Basic_RandomInt | 通过 | 最小值等于最大值时返回整数 7 | 7 |
| 05-06 | Basic_RandomInt | 通过 | 返回 -2~2 的整数 | -2 |
| 05-07 | Basic_Rnd | 通过 | 随机小数满足 0 ≤ x < 1 | 0.6374054093586852 |
| 06-01 | System_GetTempPath | 通过 | 与系统临时目录一致(忽略尾部分隔符) | "C:\\Users\\Administrator\\AppData\\Local\\Temp" |
| 06-02 | System_GetHomePath | 通过 | 与 Windows 用户文件夹一致 | "C:\\Users\\Administrator" |
| 06-03 | System_GetSystemPath | 通过 | 与 Windows 实际桌面目录一致(包含重定向) | "C:\\Users\\Administrator\\Desktop" |
| 06-04 | System_GetEnv | 通过 | 读取测试专用变量的原始值,作为恢复依据 | "隔离环境原始值" |
| 06-05 | System_SetEnv | 通过 | 当前应用进程内设置成功 | "中文-测试-42" |
| 06-06 | System_GetEnv | 通过 | 能读回中文-测试-42 | "中文-测试-42" |
| 06-07 | System_SetEnv | 通过 | 恢复测试前读取值 | "隔离环境原始值" |
| 07-01 | System_ExecuteCommand | 阻塞 | RPA-PS-中文-OK | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 07-02 | System_ExecuteCommandV1 | 阻塞 | RPA-DOS-OK | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 07-03 | System_ExecuteCommandV1 | 阻塞 | RPA-PS-V1-OK | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 07-04 | System_ExecuteCommandV1 | 阻塞 | RPA-BAT-OK | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 07-05 | System_ExecuteCommand | 阻塞 | 非零退出码应抛出异常 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 08-01 | System_AddCredential | 阻塞 | 安全输入机制准备好后,在专用目标添加测试凭据 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 08-02 | System_ReadCredential | 阻塞 | 仅验证测试凭据存在,不读取或打印密码 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 08-03 | System_DeleteCredential | 阻塞 | 删除刚创建的测试目标,之后人工确认不存在 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 09-01 | System_GetInputMethodState | 待人工确认 | 读取前台窗口的真实输入法状态,人工对照任务栏 | 手动任务不纳入自动执行 |
| 09-02 | System_SetInputMethodState | 待人工确认 | 前台编辑器应切换到英文模式;仅子进程返回 set:true 不能算通过 | 手动任务不纳入自动执行 |
| 09-03 | System_SetInputMethodState | 待人工确认 | 恢复原输入法;人工确认前台窗口的实际状态 | 手动任务不纳入自动执行 |
| 10-01 | System_PlaySound | 待人工确认 | 听到一次短提示音;没有声音不能算通过 | 手动任务不纳入自动执行 |
| 11-01 | System_ScreenSaverShow | 阻塞 | 屏幕实际进入屏保;无配置时记录阻塞 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 11-02 | System_ScreenSaverStop | 阻塞 | 屏保实际关闭,可正常操作 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 11-03 | System_ScreenSaverShowV1 | 阻塞 | 未启用密码保护时无需密码也应能运行 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 11-04 | System_ScreenSaverStop | 阻塞 | 第二种屏保实际关闭 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 12-01 | ScreenControl_Screenlock | 阻塞 | 实际锁屏;需要人在机器旁用 Windows 登录凭据恢复,不改变账户密码 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 12-02 | ScreenControl_ScreenUnlock | 阻塞 | 核对 Windows 登录解锁;当前实现仅尝试唤醒屏幕,不能标记自动解锁通过 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 13-01 | System_ConnectRemoteDesktop | 待人工确认 | 人工完成登录,并确认已连接到正确测试机器;启动 mstsc 不等于连接成功 | 手动任务不纳入自动执行 |
| 13-02 | System_CloseRemoteDesktop | 待人工确认 | 确认目标会话及恢复方式后才能执行;当前实现会调用 tsdiscon | 手动任务不纳入自动执行 |
## 运行前校验阻塞
- test_appsystem_07:「System_ExecuteCommandV1」缺少必填参数:BAT文件;「System_ExecuteCommandV1」缺少必填参数:PowerShell命令;「System_ExecuteCommandV1」缺少必填参数:DOS命令;「System_ExecuteCommandV1」缺少必填参数:BAT文件;「System_ExecuteCommandV1」缺少必填参数:DOS命令;「System_ExecuteCommandV1」缺少必填参数:PowerShell命令
- test_appsystem_08:「System_AddCredential」缺少必填参数:用户名
- test_appsystem_11:「System_ScreenSaverShowV1」缺少必填参数:password
- test_appsystem_12:「ScreenControl_Screenlock」缺少必填参数:用户名;「ScreenControl_Screenlock」缺少必填参数:密码;「ScreenControl_Screenlock」缺少必填参数:分辨率(宽);「ScreenControl_Screenlock」缺少必填参数:分辨率(高);「ScreenControl_ScreenUnlock」缺少必填参数:用户名;「ScreenControl_ScreenUnlock」缺少必填参数:密码
## 证据位置
隔离用户目录:D:\work\code\RPA-only-demo\test-output\app-system\isolated-I8utNv
- test_appsystem_01:D:\work\code\RPA-only-demo\test-output\app-system\isolated-I8utNv\runs\run_mvuqh1m8_mpns\run.json
- test_appsystem_02:D:\work\code\RPA-only-demo\test-output\app-system\isolated-I8utNv\runs\run_mvuqh8fe_enbw\run.json
- test_appsystem_03:D:\work\code\RPA-only-demo\test-output\app-system\isolated-I8utNv\runs\run_mvuqh8lw_3nsu\run.json
- test_appsystem_04:D:\work\code\RPA-only-demo\test-output\app-system\isolated-I8utNv\runs\run_mvuqh8oe_gmpo\run.json
- test_appsystem_05:D:\work\code\RPA-only-demo\test-output\app-system\isolated-I8utNv\runs\run_mvuqh8sp_54xy\run.json
- test_appsystem_06:D:\work\code\RPA-only-demo\test-output\app-system\isolated-I8utNv\runs\run_mvuqha0h_4bfu\run.json
+159
View File
@@ -0,0 +1,159 @@
# 应用与系统组件测试报告
记录时间:2026年10月30日 18:50:29(北京时间)。覆盖 49 项可执行组件,13 组任务。
按组件统计:通过 36,失败 0,阻塞 5,待人工确认 8,未运行 0。
状态依据是断言、前置校验和人工证据,节点执行成功不直接代表功能通过。未执行手动系统操作。
| 组 | 组件 ID | 名称 | 状态 |
|---|---|---|---|
| 01 | App_Run | 启动应用程序 | 通过 |
| 01 | App_GetPid | 获取一个匹配PID | 通过 |
| 01 | App_GetPids | 获取全部匹配PID | 通过 |
| 01 | App_Kill | 关闭应用程序 | 通过 |
| 01 | App_KillV1 | 关闭应用程序 | 通过 |
| 02 | Basic_StringToNum | 将文本转换为数字 | 通过 |
| 02 | Basic_ConvertNumber | 数据转为数值类型 | 通过 |
| 02 | Basic_ConvertInt | 数值转为整数类型 | 通过 |
| 02 | Basic_ConvertBool | 数据转为布尔类型 | 通过 |
| 02 | Basic_ConvertString | 将数字转换为文本 | 通过 |
| 02 | Basic_DataTypeConversion | 转换数据类型 | 通过 |
| 03 | Basic_IsDictionary | 判断数据是否为字典 | 通过 |
| 03 | Basic_IsNumber | 判断数据是否为数值 | 通过 |
| 03 | Basic_IsNull | 判断数据是否为空 | 通过 |
| 03 | Basic_IsArray | 判断数据是否为数组 | 通过 |
| 03 | Basic_Type | 获取数据类型 | 通过 |
| 03 | Basic_JudgeDataType | 判断数据类型 | 通过 |
| 04 | Basic_SetVariable | 设置变量 | 通过 |
| 04 | Basic_SetVariable_V1 | 设置变量 | 通过 |
| 04 | Basic_Clone | 复制数据 | 通过 |
| 04 | Basic_GetProcessInfo | 获取流程信息 | 通过 |
| 04 | Basic_DebugOutput | 调试输出 | 通过 |
| 04 | CustomConfig_GetConfig | 自定义配置 | 通过 |
| 04 | Basic_BusinessOrderCount | 业务办理计数 | 通过 |
| 05 | Basic_Delay_V2 | 等待 | 通过 |
| 05 | Basic_Delay_V1 | 等待 | 通过 |
| 05 | Basic_Delay | 流程延迟执行 | 通过 |
| 05 | Basic_RandomInt | 生成随机数 | 通过 |
| 05 | Basic_Rnd | 生成随机数 | 通过 |
| 06 | System_GetTempPath | 获取临时文件夹路径 | 通过 |
| 06 | System_GetHomePath | 获取用户文件夹路径 | 通过 |
| 06 | System_GetSystemPath | 获取系统文件夹路径 | 通过 |
| 06 | System_GetEnv | 获取环境变量 | 通过 |
| 06 | System_SetEnv | 设置环境变量 | 通过 |
| 07 | System_ExecuteCommand | 执行命令行 | 通过 |
| 07 | System_ExecuteCommandV1 | 执行命令行 | 通过 |
| 08 | System_AddCredential | 添加Windows凭据 | 阻塞 |
| 08 | System_ReadCredential | 获取Windows凭据 | 阻塞 |
| 08 | System_DeleteCredential | 删除Windows凭据 | 阻塞 |
| 09 | System_GetInputMethodState | 获取输入法状态 | 待人工确认 |
| 09 | System_SetInputMethodState | 设置输入法状态 | 待人工确认 |
| 10 | System_PlaySound | 播放音频 | 待人工确认 |
| 11 | System_ScreenSaverShow | 开启屏保 | 待人工确认 |
| 11 | System_ScreenSaverShowV1 | 开启屏保 | 待人工确认 |
| 11 | System_ScreenSaverStop | 关闭屏保 | 待人工确认 |
| 12 | ScreenControl_Screenlock | 屏幕锁屏 | 阻塞 |
| 12 | ScreenControl_ScreenUnlock | 唤醒屏幕(非登录解锁) | 阻塞 |
| 13 | System_ConnectRemoteDesktop | 连接远程桌面 | 待人工确认 |
| 13 | System_CloseRemoteDesktop | 关闭远程连接 | 待人工确认 |
## 真实界面验证
已通过独立 Electron 窗口检查:类型下拉选项、PID/名称参数切换、DOS/PowerShell 参数切换,以及唤醒组件不再索要账号密码。界面快照及 ui-check.json 保存在 test-output/app-system/。
## 用例证据
| 用例 | 组件 | 状态 | 预期 | 实际/原因 |
|---|---|---|---|---|
| 01-01 | App_Run | 通过 | 第一个测试进程 PID 大于 0 | 53688 |
| 01-02 | App_Run | 通过 | 第二个 PID 大于 0,且与第一个不同 | 47408 |
| 01-03 | App_GetPid | 通过 | 返回本次创建的任一 PID | 47408 |
| 01-04 | App_GetPids | 通过 | 列表恰含本次创建的两个 PID | [47408,53688] |
| 01-05 | App_Kill | 通过 | 结束第一个夹具 PID,第二个仍在运行 | [53688,false,true] |
| 01-06 | App_KillV1 | 通过 | 只填写 PID 即可结束第二个夹具进程 | [47408,false] |
| 01-07 | App_GetPids | 通过 | 所有夹具结束后应返回空数组 [] | [] |
| 01-08 | App_GetPid | 通过 | 无匹配时应返回 null | null |
| 02-01 | Basic_StringToNum | 通过 | 数字 123.5 | 123.5 |
| 02-02 | Basic_ConvertNumber | 通过 | 数字 -42.25 | -42.25 |
| 02-03 | Basic_ConvertInt | 通过 | 整数 -3(向零截断) | -3 |
| 02-04 | Basic_ConvertBool | 通过 | 布尔 true | true |
| 02-05 | Basic_ConvertBool | 通过 | 布尔 false | false |
| 02-06 | Basic_ConvertString | 通过 | 文本 "42" | "42" |
| 02-07 | Basic_DataTypeConversion | 通过 | 数值 42,严格区分文本和数值 | 42 |
| 02-08 | Basic_DataTypeConversion | 通过 | 整数 -3 | -3 |
| 02-09 | Basic_DataTypeConversion | 通过 | 布尔 false | false |
| 02-10 | Basic_DataTypeConversion | 通过 | 文本 "42" | "42" |
| 03-01 | Basic_IsDictionary | 通过 | true | true |
| 03-02 | Basic_IsDictionary | 通过 | false | false |
| 03-03 | Basic_IsNumber | 通过 | true | true |
| 03-04 | Basic_IsNumber | 通过 | false | false |
| 03-05 | Basic_IsNull | 通过 | true | true |
| 03-06 | Basic_IsNull | 通过 | true | true |
| 03-07 | Basic_IsNull | 通过 | false | false |
| 03-08 | Basic_IsArray | 通过 | true | true |
| 03-09 | Basic_IsArray | 通过 | false | false |
| 03-10 | Basic_Type | 通过 | "list" | "list" |
| 03-11 | Basic_Type | 通过 | "null" | "null" |
| 03-12 | Basic_JudgeDataType | 通过 | 数字 42 属于数值类型,返回布尔 true | true |
| 04-01 | Basic_SetVariable | 通过 | 原值及输出变量均保持中文文本 | "中文变量往返" |
| 04-02 | Basic_SetVariable_V1 | 通过 | 数字 42 | 42 |
| 04-03 | Basic_SetVariable_V1 | 通过 | 数组 [1,2] | [1,2] |
| 04-04 | Basic_Clone | 通过 | 深复制内容相同,外层和嵌套对象均不共用引用 | {"title":"中文","nested":{"n":1}} |
| 04-05 | Basic_GetProcessInfo | 通过 | 当前流程 ID、名称、运行 ID 和节点数一致 | {"id":"test_appsystem_04","name":"组件测试 04 · 变量与配置","description":"查看运行日志中的用例结果;有失败时任务最终显示失败,其他用例仍继续。","enabled":true,"trigger":{"type":"manual","label":"手动运行"},"version":"0.1.0","createdAt":"2026-10-30T00:00:00.000Z","updatedAt":"2026-10-30T00:00:00.000Z","nodeCount":99,"runId":"run_mvuupg9x_yifj"} |
| 04-06 | Basic_DebugOutput | 通过 | 日志及返回值为“中文日志测试:42” | "中文日志测试:42" |
| 04-07 | CustomConfig_GetConfig | 通过 | 数字 30 | 30 |
| 04-08 | CustomConfig_GetConfig | 通过 | 未命中返回 null | null |
| 04-09 | Basic_BusinessOrderCount | 通过 | 首次计数 12 | 12 |
| 04-10 | Basic_BusinessOrderCount | 通过 | 同一流程再次计数 14 | 14 |
| 05-01 | Basic_Delay_V2 | 通过 | 实际等待耗时 120~1800 ms | 165 |
| 05-02 | Basic_Delay_V2 | 通过 | 实际等待耗时 80~1800 ms | 122 |
| 05-03 | Basic_Delay_V1 | 通过 | 实际等待耗时 120~1800 ms | 154 |
| 05-04 | Basic_Delay | 通过 | 实际等待耗时 2800~6500 ms | 3011 |
| 05-05 | Basic_RandomInt | 通过 | 最小值等于最大值时返回整数 7 | 7 |
| 05-06 | Basic_RandomInt | 通过 | 返回 -2~2 的整数 | 2 |
| 05-07 | Basic_Rnd | 通过 | 随机小数满足 0 ≤ x < 1 | 0.18320588816502648 |
| 06-01 | System_GetTempPath | 通过 | 与系统临时目录一致(忽略尾部分隔符) | "C:\\Users\\Administrator\\AppData\\Local\\Temp" |
| 06-02 | System_GetHomePath | 通过 | 与 Windows 用户文件夹一致 | "C:\\Users\\Administrator" |
| 06-03 | System_GetSystemPath | 通过 | 与 Windows 实际桌面目录一致(包含重定向) | "C:\\Users\\Administrator\\Desktop" |
| 06-04 | System_GetEnv | 通过 | 读取测试专用变量的原始值,作为恢复依据 | "隔离环境原始值" |
| 06-05 | System_SetEnv | 通过 | 当前应用进程内设置成功 | "中文-测试-42" |
| 06-06 | System_GetEnv | 通过 | 能读回中文-测试-42 | "中文-测试-42" |
| 06-07 | System_SetEnv | 通过 | 恢复测试前读取值 | "隔离环境原始值" |
| 07-01 | System_ExecuteCommand | 通过 | RPA-PS-中文-OK | "RPA-PS-中文-OK" |
| 07-02 | System_ExecuteCommandV1 | 通过 | RPA-DOS-OK | "RPA-DOS-OK" |
| 07-03 | System_ExecuteCommandV1 | 通过 | RPA-PS-V1-OK | "RPA-PS-V1-OK" |
| 07-04 | System_ExecuteCommandV1 | 通过 | RPA-BAT-OK | "RPA-BAT-OK" |
| 07-05 | System_ExecuteCommand | 通过 | 非零退出码应抛出异常 | "桌面操作失败:Command failed: powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQA9ACcAUwBpAGwAZQBuAHQAbAB5AEMAbwBuAHQAaQBuAHUAZQAnADsAIABbAEMAbwBuAHMAbwBsAGUAXQA6ADoATwB1AHQAcAB1AHQARQBuAGMAbwBkAGkAbgBnAD0AWwBTAHkAcwB0AGUAbQAuAFQAZQB4AHQALgBVAFQARgA4AEUAbgBjAG8AZABpAG4AZwBdADoAOgBuAGUAdwAoACQAZgBhAGwAcwBlACkAOwAgACQATwB1AHQAcAB1AHQARQBuAGMAbwBkAGkAbgBnAD0AWwBDAG8AbgBzAG8AbABlAF0AOgA6AE8AdQB0AHAAdQB0AEUAbgBjAG8AZABpAG4AZwA7ACAAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAFIAUABBAC0ARQBSAFIATwBSAC0AUABSAE8AQgBFACcAOwAgAGUAeABpAHQAIAA5AA==\n" |
| 08-01 | System_AddCredential | 阻塞 | 安全输入机制准备好后,在专用目标添加测试凭据 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 08-02 | System_ReadCredential | 阻塞 | 仅验证测试凭据存在,不读取或打印密码 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 08-03 | System_DeleteCredential | 阻塞 | 删除刚创建的测试目标,之后人工确认不存在 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 09-01 | System_GetInputMethodState | 待人工确认 | 读取前台窗口的真实输入法状态,人工对照任务栏 | 手动任务不纳入自动执行 |
| 09-02 | System_SetInputMethodState | 待人工确认 | 前台编辑器应切换到英文模式;仅子进程返回 set:true 不能算通过 | 手动任务不纳入自动执行 |
| 09-03 | System_SetInputMethodState | 待人工确认 | 恢复原输入法;人工确认前台窗口的实际状态 | 手动任务不纳入自动执行 |
| 10-01 | System_PlaySound | 待人工确认 | 听到一次短提示音;没有声音不能算通过 | 手动任务不纳入自动执行 |
| 11-01 | System_ScreenSaverShow | 待人工确认 | 屏幕实际进入屏保;无配置时记录阻塞 | 手动任务不纳入自动执行 |
| 11-02 | System_ScreenSaverStop | 待人工确认 | 屏保实际关闭,可正常操作 | 手动任务不纳入自动执行 |
| 11-03 | System_ScreenSaverShowV1 | 待人工确认 | 开启 Windows 已配置的屏保,不要求输入密码;人工确认屏幕实际变化 | 手动任务不纳入自动执行 |
| 11-04 | System_ScreenSaverStop | 待人工确认 | 第二种屏保实际关闭 | 手动任务不纳入自动执行 |
| 12-01 | ScreenControl_Screenlock | 阻塞 | 实际锁屏;需要人在机器旁用 Windows 登录凭据恢复,不改变账户密码 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 12-02 | ScreenControl_ScreenUnlock | 阻塞 | 仅尝试唤醒屏幕,loginUnlockSupported 必须为 false;Windows 登录仍需人工完成 | 运行前参数校验拦截,未绕过校验;详见校验问题 |
| 13-01 | System_ConnectRemoteDesktop | 待人工确认 | 人工完成登录,并确认已连接到正确测试机器;启动 mstsc 不等于连接成功 | 手动任务不纳入自动执行 |
| 13-02 | System_CloseRemoteDesktop | 待人工确认 | 确认目标会话及恢复方式后才能执行;当前实现会调用 tsdiscon | 手动任务不纳入自动执行 |
## 运行前校验阻塞
- test_appsystem_08:「System_AddCredential」缺少必填参数:用户名
- test_appsystem_12:「ScreenControl_Screenlock」缺少必填参数:用户名;「ScreenControl_Screenlock」缺少必填参数:密码;「ScreenControl_Screenlock」缺少必填参数:分辨率(宽);「ScreenControl_Screenlock」缺少必填参数:分辨率(高)
## 证据位置
隔离用户目录:D:\work\code\RPA-only-demo\test-output\app-system\isolated-PN2R7C
- test_appsystem_01:D:\work\code\RPA-only-demo\test-output\app-system\isolated-PN2R7C\runs\run_mvuuparb_ikwv\run.json
- test_appsystem_02:D:\work\code\RPA-only-demo\test-output\app-system\isolated-PN2R7C\runs\run_mvuupg4i_9qr9\run.json
- test_appsystem_03:D:\work\code\RPA-only-demo\test-output\app-system\isolated-PN2R7C\runs\run_mvuupg6q_6ij5\run.json
- test_appsystem_04:D:\work\code\RPA-only-demo\test-output\app-system\isolated-PN2R7C\runs\run_mvuupg9x_yifj\run.json
- test_appsystem_05:D:\work\code\RPA-only-demo\test-output\app-system\isolated-PN2R7C\runs\run_mvuupgcn_2wod\run.json
- test_appsystem_06:D:\work\code\RPA-only-demo\test-output\app-system\isolated-PN2R7C\runs\run_mvuupj2n_b65x\run.json
- test_appsystem_07:D:\work\code\RPA-only-demo\test-output\app-system\isolated-PN2R7C\runs\run_mvuupjiv_mh0i\run.json
Binary file not shown.
@@ -0,0 +1,851 @@
{
"schemaVersion": 1,
"generatedAt": "2026-10-30T00:00:00.000Z",
"groups": [
{
"id": "test_appsystem_01",
"file": "test_appsystem_01.json",
"name": "组件测试 01 · 应用与 PID",
"manual": false,
"components": [
"App_Run",
"App_GetPid",
"App_GetPids",
"App_Kill",
"App_KillV1"
],
"cases": [
{
"id": "01-01",
"componentId": "App_Run",
"targetNodeId": "t01_8",
"resultVariable": "case_1",
"input": "{\"executeable\":\"${fixture.exe}\"}",
"expected": "第一个测试进程 PID 大于 0",
"observe": false
},
{
"id": "01-02",
"componentId": "App_Run",
"targetNodeId": "t01_17",
"resultVariable": "case_2",
"input": "{\"executeable\":\"${fixture.exe}\"}",
"expected": "第二个 PID 大于 0,且与第一个不同",
"observe": false
},
{
"id": "01-03",
"componentId": "App_GetPid",
"targetNodeId": "t01_26",
"resultVariable": "case_3",
"input": "{\"pattern\":\"${fixture.name}.exe\"}",
"expected": "返回本次创建的任一 PID",
"observe": false
},
{
"id": "01-04",
"componentId": "App_GetPids",
"targetNodeId": "t01_35",
"resultVariable": "case_4",
"input": "{\"pattern\":\"${fixture.name}.exe\"}",
"expected": "列表恰含本次创建的两个 PID",
"observe": false
},
{
"id": "01-05",
"componentId": "App_Kill",
"targetNodeId": "t01_44",
"resultVariable": "case_5",
"input": "{\"pid\":\"${pid1}\"}",
"expected": "结束第一个夹具 PID,第二个仍在运行",
"observe": false
},
{
"id": "01-06",
"componentId": "App_KillV1",
"targetNodeId": "t01_55",
"resultVariable": "case_6",
"input": "{\"close_type\":\"id\",\"pid\":\"${pid2}\",\"kill_all\":\"0\"}",
"expected": "只填写 PID 即可结束第二个夹具进程",
"observe": false
},
{
"id": "01-07",
"componentId": "App_GetPids",
"targetNodeId": "t01_65",
"resultVariable": "case_7",
"input": "{\"pattern\":\"${fixture.name}.exe\"}",
"expected": "所有夹具结束后应返回空数组 []",
"observe": false
},
{
"id": "01-08",
"componentId": "App_GetPid",
"targetNodeId": "t01_74",
"resultVariable": "case_8",
"input": "{\"pattern\":\"${fixture.name}.exe\"}",
"expected": "无匹配时应返回 null",
"observe": false
}
]
},
{
"id": "test_appsystem_02",
"file": "test_appsystem_02.json",
"name": "组件测试 02 · 数据转换",
"manual": false,
"components": [
"Basic_StringToNum",
"Basic_ConvertNumber",
"Basic_ConvertInt",
"Basic_ConvertBool",
"Basic_ConvertString",
"Basic_DataTypeConversion"
],
"cases": [
{
"id": "02-01",
"componentId": "Basic_StringToNum",
"targetNodeId": "t02_6",
"resultVariable": "case_1",
"input": "{\"val\":\"123.5\"}",
"expected": "数字 123.5",
"observe": false
},
{
"id": "02-02",
"componentId": "Basic_ConvertNumber",
"targetNodeId": "t02_15",
"resultVariable": "case_2",
"input": "{\"val\":\"-42.25\"}",
"expected": "数字 -42.25",
"observe": false
},
{
"id": "02-03",
"componentId": "Basic_ConvertInt",
"targetNodeId": "t02_24",
"resultVariable": "case_3",
"input": "{\"val\":-3.9}",
"expected": "整数 -3(向零截断)",
"observe": false
},
{
"id": "02-04",
"componentId": "Basic_ConvertBool",
"targetNodeId": "t02_33",
"resultVariable": "case_4",
"input": "{\"val\":\"true\"}",
"expected": "布尔 true",
"observe": false
},
{
"id": "02-05",
"componentId": "Basic_ConvertBool",
"targetNodeId": "t02_42",
"resultVariable": "case_5",
"input": "{\"val\":\"false\"}",
"expected": "布尔 false",
"observe": false
},
{
"id": "02-06",
"componentId": "Basic_ConvertString",
"targetNodeId": "t02_51",
"resultVariable": "case_6",
"input": "{\"val\":42}",
"expected": "文本 \"42\"",
"observe": false
},
{
"id": "02-07",
"componentId": "Basic_DataTypeConversion",
"targetNodeId": "t02_60",
"resultVariable": "case_7",
"input": "{\"val\":\"42\",\"into_type\":\"number\"}",
"expected": "数值 42,严格区分文本和数值",
"observe": false
},
{
"id": "02-08",
"componentId": "Basic_DataTypeConversion",
"targetNodeId": "t02_69",
"resultVariable": "case_8",
"input": "{\"val\":\"-3.9\",\"into_type\":\"int\"}",
"expected": "整数 -3",
"observe": false
},
{
"id": "02-09",
"componentId": "Basic_DataTypeConversion",
"targetNodeId": "t02_78",
"resultVariable": "case_9",
"input": "{\"val\":\"false\",\"into_type\":\"bool\"}",
"expected": "布尔 false",
"observe": false
},
{
"id": "02-10",
"componentId": "Basic_DataTypeConversion",
"targetNodeId": "t02_87",
"resultVariable": "case_10",
"input": "{\"val\":42,\"into_type\":\"string\"}",
"expected": "文本 \"42\"",
"observe": false
}
]
},
{
"id": "test_appsystem_03",
"file": "test_appsystem_03.json",
"name": "组件测试 03 · 数据判断",
"manual": false,
"components": [
"Basic_IsDictionary",
"Basic_IsNumber",
"Basic_IsNull",
"Basic_IsArray",
"Basic_Type",
"Basic_JudgeDataType"
],
"cases": [
{
"id": "03-01",
"componentId": "Basic_IsDictionary",
"targetNodeId": "t03_6",
"resultVariable": "case_1",
"input": "{\"val\":{\"name\":\"测试\"}}",
"expected": "true",
"observe": false
},
{
"id": "03-02",
"componentId": "Basic_IsDictionary",
"targetNodeId": "t03_15",
"resultVariable": "case_2",
"input": "{\"val\":[]}",
"expected": "false",
"observe": false
},
{
"id": "03-03",
"componentId": "Basic_IsNumber",
"targetNodeId": "t03_24",
"resultVariable": "case_3",
"input": "{\"val\":\"12.5\"}",
"expected": "true",
"observe": false
},
{
"id": "03-04",
"componentId": "Basic_IsNumber",
"targetNodeId": "t03_33",
"resultVariable": "case_4",
"input": "{\"val\":\"中文\"}",
"expected": "false",
"observe": false
},
{
"id": "03-05",
"componentId": "Basic_IsNull",
"targetNodeId": "t03_42",
"resultVariable": "case_5",
"input": "{\"val\":null}",
"expected": "true",
"observe": false
},
{
"id": "03-06",
"componentId": "Basic_IsNull",
"targetNodeId": "t03_51",
"resultVariable": "case_6",
"input": "{\"val\":\"\"}",
"expected": "true",
"observe": false
},
{
"id": "03-07",
"componentId": "Basic_IsNull",
"targetNodeId": "t03_60",
"resultVariable": "case_7",
"input": "{\"val\":0}",
"expected": "false",
"observe": false
},
{
"id": "03-08",
"componentId": "Basic_IsArray",
"targetNodeId": "t03_69",
"resultVariable": "case_8",
"input": "{\"val\":[]}",
"expected": "true",
"observe": false
},
{
"id": "03-09",
"componentId": "Basic_IsArray",
"targetNodeId": "t03_78",
"resultVariable": "case_9",
"input": "{\"val\":\"[]\"}",
"expected": "false",
"observe": false
},
{
"id": "03-10",
"componentId": "Basic_Type",
"targetNodeId": "t03_87",
"resultVariable": "case_10",
"input": "{\"val\":[1,2]}",
"expected": "\"list\"",
"observe": false
},
{
"id": "03-11",
"componentId": "Basic_Type",
"targetNodeId": "t03_96",
"resultVariable": "case_11",
"input": "{\"val\":null}",
"expected": "\"null\"",
"observe": false
},
{
"id": "03-12",
"componentId": "Basic_JudgeDataType",
"targetNodeId": "t03_105",
"resultVariable": "case_12",
"input": "{\"val\":42,\"into_type\":\"number\"}",
"expected": "数字 42 属于数值类型,返回布尔 true",
"observe": false
}
]
},
{
"id": "test_appsystem_04",
"file": "test_appsystem_04.json",
"name": "组件测试 04 · 变量与配置",
"manual": false,
"components": [
"Basic_SetVariable",
"Basic_SetVariable_V1",
"Basic_Clone",
"Basic_GetProcessInfo",
"Basic_DebugOutput",
"CustomConfig_GetConfig",
"Basic_BusinessOrderCount"
],
"cases": [
{
"id": "04-01",
"componentId": "Basic_SetVariable",
"targetNodeId": "t04_6",
"resultVariable": "case_1",
"input": "{\"value\":\"中文变量往返\"}",
"expected": "原值及输出变量均保持中文文本",
"observe": false
},
{
"id": "04-02",
"componentId": "Basic_SetVariable_V1",
"targetNodeId": "t04_15",
"resultVariable": "case_2",
"input": "{\"variableType\":\"rpa_int\",\"value\":\"42\"}",
"expected": "数字 42",
"observe": false
},
{
"id": "04-03",
"componentId": "Basic_SetVariable_V1",
"targetNodeId": "t04_24",
"resultVariable": "case_3",
"input": "{\"variableType\":\"rpa_list\",\"value\":\"[1,2]\"}",
"expected": "数组 [1,2]",
"observe": false
},
{
"id": "04-04",
"componentId": "Basic_Clone",
"targetNodeId": "t04_34",
"resultVariable": "case_4",
"input": "{\"val\":\"${original}\"}",
"expected": "深复制内容相同,外层和嵌套对象均不共用引用",
"observe": false
},
{
"id": "04-05",
"componentId": "Basic_GetProcessInfo",
"targetNodeId": "t04_43",
"resultVariable": "case_5",
"input": "{}",
"expected": "当前流程 ID、名称、运行 ID 和节点数一致",
"observe": false
},
{
"id": "04-06",
"componentId": "Basic_DebugOutput",
"targetNodeId": "t04_52",
"resultVariable": "case_6",
"input": "{\"msg\":\"中文日志测试:${actual_2}\"}",
"expected": "日志及返回值为“中文日志测试:42”",
"observe": false
},
{
"id": "04-07",
"componentId": "CustomConfig_GetConfig",
"targetNodeId": "t04_61",
"resultVariable": "case_7",
"input": "{\"jsonlist\":\"[{\\\"name\\\":\\\"timeout\\\",\\\"value\\\":30}]\",\"configName\":\"timeout\"}",
"expected": "数字 30",
"observe": false
},
{
"id": "04-08",
"componentId": "CustomConfig_GetConfig",
"targetNodeId": "t04_70",
"resultVariable": "case_8",
"input": "{\"jsonlist\":\"[]\",\"configName\":\"missing\"}",
"expected": "未命中返回 null",
"observe": false
},
{
"id": "04-09",
"componentId": "Basic_BusinessOrderCount",
"targetNodeId": "t04_79",
"resultVariable": "case_9",
"input": "{\"start_count\":10,\"count\":2}",
"expected": "首次计数 12",
"observe": false
},
{
"id": "04-10",
"componentId": "Basic_BusinessOrderCount",
"targetNodeId": "t04_88",
"resultVariable": "case_10",
"input": "{\"start_count\":10,\"count\":2}",
"expected": "同一流程再次计数 14",
"observe": false
}
]
},
{
"id": "test_appsystem_05",
"file": "test_appsystem_05.json",
"name": "组件测试 05 · 等待与随机数",
"manual": false,
"components": [
"Basic_Delay_V2",
"Basic_Delay_V1",
"Basic_Delay",
"Basic_RandomInt",
"Basic_Rnd"
],
"cases": [
{
"id": "05-01",
"componentId": "Basic_Delay_V2",
"targetNodeId": "t05_7",
"resultVariable": "case_1",
"input": "{\"is_random\":\"0\",\"second\":\"0.15\",\"min_second\":\"0.1\",\"max_second\":\"0.2\"}",
"expected": "实际等待耗时 120~1800 ms",
"observe": false
},
{
"id": "05-02",
"componentId": "Basic_Delay_V2",
"targetNodeId": "t05_18",
"resultVariable": "case_2",
"input": "{\"is_random\":\"1\",\"second\":\"0.15\",\"min_second\":\"0.1\",\"max_second\":\"0.2\"}",
"expected": "实际等待耗时 80~1800 ms",
"observe": false
},
{
"id": "05-03",
"componentId": "Basic_Delay_V1",
"targetNodeId": "t05_29",
"resultVariable": "case_3",
"input": "{\"second\":\"0.15\"}",
"expected": "实际等待耗时 120~1800 ms",
"observe": false
},
{
"id": "05-04",
"componentId": "Basic_Delay",
"targetNodeId": "t05_40",
"resultVariable": "case_4",
"input": "{\"mileSecond\":\"3000\"}",
"expected": "实际等待耗时 2800~6500 ms",
"observe": false
},
{
"id": "05-05",
"componentId": "Basic_RandomInt",
"targetNodeId": "t05_50",
"resultVariable": "case_5",
"input": "{\"min\":7,\"max\":7}",
"expected": "最小值等于最大值时返回整数 7",
"observe": false
},
{
"id": "05-06",
"componentId": "Basic_RandomInt",
"targetNodeId": "t05_59",
"resultVariable": "case_6",
"input": "{\"min\":-2,\"max\":2}",
"expected": "返回 -2~2 的整数",
"observe": false
},
{
"id": "05-07",
"componentId": "Basic_Rnd",
"targetNodeId": "t05_68",
"resultVariable": "case_7",
"input": "{}",
"expected": "随机小数满足 0 ≤ x < 1",
"observe": false
}
]
},
{
"id": "test_appsystem_06",
"file": "test_appsystem_06.json",
"name": "组件测试 06 · 系统路径与环境变量",
"manual": false,
"components": [
"System_GetTempPath",
"System_GetHomePath",
"System_GetSystemPath",
"System_GetEnv",
"System_SetEnv"
],
"cases": [
{
"id": "06-01",
"componentId": "System_GetTempPath",
"targetNodeId": "t06_8",
"resultVariable": "case_1",
"input": "{}",
"expected": "与系统临时目录一致(忽略尾部分隔符)",
"observe": false
},
{
"id": "06-02",
"componentId": "System_GetHomePath",
"targetNodeId": "t06_17",
"resultVariable": "case_2",
"input": "{}",
"expected": "与 Windows 用户文件夹一致",
"observe": false
},
{
"id": "06-03",
"componentId": "System_GetSystemPath",
"targetNodeId": "t06_26",
"resultVariable": "case_3",
"input": "{\"path_name\":\"desktop\"}",
"expected": "与 Windows 实际桌面目录一致(包含重定向)",
"observe": false
},
{
"id": "06-04",
"componentId": "System_GetEnv",
"targetNodeId": "t06_35",
"resultVariable": "case_4",
"input": "{\"name\":\"RPA_APP_SYSTEM_TEST_VALUE\"}",
"expected": "读取测试专用变量的原始值,作为恢复依据",
"observe": false
},
{
"id": "06-05",
"componentId": "System_SetEnv",
"targetNodeId": "t06_44",
"resultVariable": "case_5",
"input": "{\"name\":\"RPA_APP_SYSTEM_TEST_VALUE\",\"value\":\"中文-测试-42\"}",
"expected": "当前应用进程内设置成功",
"observe": false
},
{
"id": "06-06",
"componentId": "System_GetEnv",
"targetNodeId": "t06_53",
"resultVariable": "case_6",
"input": "{\"name\":\"RPA_APP_SYSTEM_TEST_VALUE\"}",
"expected": "能读回中文-测试-42",
"observe": false
},
{
"id": "06-07",
"componentId": "System_SetEnv",
"targetNodeId": "t06_62",
"resultVariable": "case_7",
"input": "{\"name\":\"RPA_APP_SYSTEM_TEST_VALUE\",\"value\":\"${originalEnv}\"}",
"expected": "恢复测试前读取值",
"observe": false
}
]
},
{
"id": "test_appsystem_07",
"file": "test_appsystem_07.json",
"name": "组件测试 07 · 命令行",
"manual": false,
"components": [
"System_ExecuteCommand",
"System_ExecuteCommandV1"
],
"cases": [
{
"id": "07-01",
"componentId": "System_ExecuteCommand",
"targetNodeId": "t07_6",
"resultVariable": "case_1",
"input": "{\"action\":\"Write-Output 'RPA-PS-中文-OK'\"}",
"expected": "RPA-PS-中文-OK",
"observe": false
},
{
"id": "07-02",
"componentId": "System_ExecuteCommandV1",
"targetNodeId": "t07_15",
"resultVariable": "case_2",
"input": "{\"command_type\":\"1\",\"dos_command\":\"echo RPA-DOS-OK\",\"get_ret\":\"1\"}",
"expected": "RPA-DOS-OK",
"observe": false
},
{
"id": "07-03",
"componentId": "System_ExecuteCommandV1",
"targetNodeId": "t07_24",
"resultVariable": "case_3",
"input": "{\"command_type\":\"3\",\"ps_command\":\"Write-Output 'RPA-PS-V1-OK'\",\"get_ret\":\"1\"}",
"expected": "RPA-PS-V1-OK",
"observe": false
},
{
"id": "07-04",
"componentId": "System_ExecuteCommandV1",
"targetNodeId": "t07_34",
"resultVariable": "case_4",
"input": "{\"command_type\":\"2\",\"bat_file\":\"${batPath}\",\"get_ret\":\"1\"}",
"expected": "RPA-BAT-OK",
"observe": false
},
{
"id": "07-05",
"componentId": "System_ExecuteCommand",
"targetNodeId": "t07_43",
"resultVariable": "case_5",
"input": "{\"action\":\"Write-Output 'RPA-ERROR-PROBE'; exit 9\"}",
"expected": "非零退出码应抛出异常",
"observe": false
}
]
},
{
"id": "test_appsystem_08",
"file": "test_appsystem_08.json",
"name": "组件测试 08 · Windows 凭据【手动】",
"manual": true,
"components": [
"System_AddCredential",
"System_ReadCredential",
"System_DeleteCredential"
],
"cases": [
{
"id": "08-01",
"componentId": "System_AddCredential",
"targetNodeId": "t08_10",
"resultVariable": "case_1",
"input": "{\"application\":\"${credentialTarget}\",\"name\":\"\",\"password\":\"\"}",
"expected": "安全输入机制准备好后,在专用目标添加测试凭据",
"observe": true
},
{
"id": "08-02",
"componentId": "System_ReadCredential",
"targetNodeId": "t08_21",
"resultVariable": "case_2",
"input": "{\"application\":\"${credentialTarget}\"}",
"expected": "仅验证测试凭据存在,不读取或打印密码",
"observe": true
},
{
"id": "08-03",
"componentId": "System_DeleteCredential",
"targetNodeId": "t08_32",
"resultVariable": "case_3",
"input": "{\"application\":\"${credentialTarget}\"}",
"expected": "删除刚创建的测试目标,之后人工确认不存在",
"observe": true
}
]
},
{
"id": "test_appsystem_09",
"file": "test_appsystem_09.json",
"name": "组件测试 09 · 输入法【手动】",
"manual": true,
"components": [
"System_GetInputMethodState",
"System_SetInputMethodState"
],
"cases": [
{
"id": "09-01",
"componentId": "System_GetInputMethodState",
"targetNodeId": "t09_9",
"resultVariable": "case_1",
"input": "{}",
"expected": "读取前台窗口的真实输入法状态,人工对照任务栏",
"observe": true
},
{
"id": "09-02",
"componentId": "System_SetInputMethodState",
"targetNodeId": "t09_20",
"resultVariable": "case_2",
"input": "{\"mode\":\"en-US\"}",
"expected": "前台编辑器应切换到英文模式;仅子进程返回 set:true 不能算通过",
"observe": true
},
{
"id": "09-03",
"componentId": "System_SetInputMethodState",
"targetNodeId": "t09_31",
"resultVariable": "case_3",
"input": "{\"mode\":\"${originalIme.culture}\"}",
"expected": "恢复原输入法;人工确认前台窗口的实际状态",
"observe": true
}
]
},
{
"id": "test_appsystem_10",
"file": "test_appsystem_10.json",
"name": "组件测试 10 · 音频【手动】",
"manual": true,
"components": [
"System_PlaySound"
],
"cases": [
{
"id": "10-01",
"componentId": "System_PlaySound",
"targetNodeId": "t10_10",
"resultVariable": "case_1",
"input": "{\"audio\":\"${audioPath}\"}",
"expected": "听到一次短提示音;没有声音不能算通过",
"observe": true
}
]
},
{
"id": "test_appsystem_11",
"file": "test_appsystem_11.json",
"name": "组件测试 11 · 屏保【手动】",
"manual": true,
"components": [
"System_ScreenSaverShow",
"System_ScreenSaverShowV1",
"System_ScreenSaverStop"
],
"cases": [
{
"id": "11-01",
"componentId": "System_ScreenSaverShow",
"targetNodeId": "t11_9",
"resultVariable": "case_1",
"input": "{\"text\":\"RPA 测试\",\"status\":\"1\"}",
"expected": "屏幕实际进入屏保;无配置时记录阻塞",
"observe": true
},
{
"id": "11-02",
"componentId": "System_ScreenSaverStop",
"targetNodeId": "t11_20",
"resultVariable": "case_2",
"input": "{}",
"expected": "屏保实际关闭,可正常操作",
"observe": true
},
{
"id": "11-03",
"componentId": "System_ScreenSaverShowV1",
"targetNodeId": "t11_31",
"resultVariable": "case_3",
"input": "{}",
"expected": "开启 Windows 已配置的屏保,不要求输入密码;人工确认屏幕实际变化",
"observe": true
},
{
"id": "11-04",
"componentId": "System_ScreenSaverStop",
"targetNodeId": "t11_42",
"resultVariable": "case_4",
"input": "{}",
"expected": "第二种屏保实际关闭",
"observe": true
}
]
},
{
"id": "test_appsystem_12",
"file": "test_appsystem_12.json",
"name": "组件测试 12 · 锁屏与解锁【手动】",
"manual": true,
"components": [
"ScreenControl_Screenlock",
"ScreenControl_ScreenUnlock"
],
"cases": [
{
"id": "12-01",
"componentId": "ScreenControl_Screenlock",
"targetNodeId": "t12_9",
"resultVariable": "case_1",
"input": "{\"username\":\"\",\"pwd\":\"\",\"width\":\"\",\"height\":\"\",\"scale_factor\":\"100\"}",
"expected": "实际锁屏;需要人在机器旁用 Windows 登录凭据恢复,不改变账户密码",
"observe": true
},
{
"id": "12-02",
"componentId": "ScreenControl_ScreenUnlock",
"targetNodeId": "t12_20",
"resultVariable": "case_2",
"input": "{}",
"expected": "仅尝试唤醒屏幕,loginUnlockSupported 必须为 false;Windows 登录仍需人工完成",
"observe": true
}
]
},
{
"id": "test_appsystem_13",
"file": "test_appsystem_13.json",
"name": "组件测试 13 · 远程桌面【手动】",
"manual": true,
"components": [
"System_ConnectRemoteDesktop",
"System_CloseRemoteDesktop"
],
"cases": [
{
"id": "13-01",
"componentId": "System_ConnectRemoteDesktop",
"targetNodeId": "t13_11",
"resultVariable": "case_1",
"input": "{\"ip\":\"${remoteAddress}\",\"port\":\"3389\"}",
"expected": "人工完成登录,并确认已连接到正确测试机器;启动 mstsc 不等于连接成功",
"observe": true
},
{
"id": "13-02",
"componentId": "System_CloseRemoteDesktop",
"targetNodeId": "t13_22",
"resultVariable": "case_2",
"input": "{}",
"expected": "确认目标会话及恢复方式后才能执行;当前实现会调用 tsdiscon",
"observe": true
}
]
}
]
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,897 @@
{
"schemaVersion": 1,
"id": "test_appsystem_08",
"name": "组件测试 08 · Windows 凭据【手动】",
"description": "手动测试:先阅读测试说明。默认不开启执行开关,不能把组件返回成功当作功能通过。",
"enabled": true,
"trigger": {
"type": "manual",
"label": "手动运行"
},
"variables": [],
"nodes": [
{
"id": "t08_1",
"componentId": "Trigger.Manual",
"label": "人工发起",
"position": {
"x": 220,
"y": 80
},
"values": {
"entryName": "开始组件测试"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t08_2",
"componentId": "Basic_SetVariable",
"label": "初始化失败计数",
"position": {
"x": 220,
"y": 222
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
}
},
{
"id": "t08_3",
"componentId": "Basic_SetVariable",
"label": "初始化待确认计数",
"position": {
"x": 220,
"y": 364
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
}
},
{
"id": "t08_4",
"componentId": "Basic_SetVariable",
"label": "初始化阻塞计数",
"position": {
"x": 220,
"y": 506
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "blocked"
}
},
{
"id": "t08_5",
"componentId": "Basic_SetVariable",
"label": "手动执行开关:确认环境后才可改为 true",
"position": {
"x": 220,
"y": 648
},
"values": {
"value": false
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "manualEnabled"
}
},
{
"id": "t08_6",
"componentId": "Basic_SetVariable",
"label": "只允许使用新的测试凭据目标",
"position": {
"x": 220,
"y": 790
},
"values": {
"value": "RPA-AppSystem-Tests-${now()}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "credentialTarget"
}
},
{
"id": "t08_7",
"componentId": "logic_control_try_catch",
"label": "08-01 · System_AddCredential",
"position": {
"x": 220,
"y": 932
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t08_8",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 1340
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t08_7",
"slot": "try_fn"
},
{
"id": "t08_9",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 1340
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t08_8",
"slot": "statement_else"
},
{
"id": "t08_10",
"componentId": "System_AddCredential",
"label": "System_AddCredential",
"position": {
"x": 220,
"y": 1340
},
"values": {
"application": "${credentialTarget}",
"name": "",
"password": ""
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "actual_1"
},
"parentId": "t08_8",
"slot": "statement_if"
},
{
"id": "t08_11",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${[\"08-01\", \"System_AddCredential\", \"MANUAL\", \"{\\\"application\\\":\\\"${credentialTarget}\\\",\\\"name\\\":\\\"\\\",\\\"password\\\":\\\"\\\"}\", \"安全输入机制准备好后,在专用目标添加测试凭据\", actual_1]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_1"
},
"parentId": "t08_8",
"slot": "statement_if"
},
{
"id": "t08_12",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${failures + (case_1[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t08_8",
"slot": "statement_if"
},
{
"id": "t08_13",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${pending + (case_1[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t08_8",
"slot": "statement_if"
},
{
"id": "t08_14",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${[\"08-01\", \"System_AddCredential\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{\\\"application\\\":\\\"${credentialTarget}\\\",\\\"name\\\":\\\"\\\",\\\"password\\\":\\\"\\\"}\", \"安全输入机制准备好后,在专用目标添加测试凭据\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_1"
},
"parentId": "t08_7",
"slot": "except_fn"
},
{
"id": "t08_15",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${failures + (case_1[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t08_7",
"slot": "except_fn"
},
{
"id": "t08_16",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${pending + (case_1[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t08_7",
"slot": "except_fn"
},
{
"id": "t08_17",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 1436
},
"values": {
"msg": "用例结果:${json(case_1)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t08_18",
"componentId": "logic_control_try_catch",
"label": "08-02 · System_ReadCredential",
"position": {
"x": 220,
"y": 1578
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t08_19",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 1700
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t08_18",
"slot": "try_fn"
},
{
"id": "t08_20",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 1700
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t08_19",
"slot": "statement_else"
},
{
"id": "t08_21",
"componentId": "System_ReadCredential",
"label": "System_ReadCredential",
"position": {
"x": 220,
"y": 1700
},
"values": {
"application": "${credentialTarget}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "actual_2"
},
"parentId": "t08_19",
"slot": "statement_if"
},
{
"id": "t08_22",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 1700
},
"values": {
"value": "${[\"08-02\", \"System_ReadCredential\", \"MANUAL\", \"{\\\"application\\\":\\\"${credentialTarget}\\\"}\", \"仅验证测试凭据存在,不读取或打印密码\", actual_2]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_2"
},
"parentId": "t08_19",
"slot": "statement_if"
},
{
"id": "t08_23",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 1700
},
"values": {
"value": "${failures + (case_2[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t08_19",
"slot": "statement_if"
},
{
"id": "t08_24",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 1700
},
"values": {
"value": "${pending + (case_2[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t08_19",
"slot": "statement_if"
},
{
"id": "t08_25",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 1700
},
"values": {
"value": "${[\"08-02\", \"System_ReadCredential\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{\\\"application\\\":\\\"${credentialTarget}\\\"}\", \"仅验证测试凭据存在,不读取或打印密码\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_2"
},
"parentId": "t08_18",
"slot": "except_fn"
},
{
"id": "t08_26",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 1700
},
"values": {
"value": "${failures + (case_2[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t08_18",
"slot": "except_fn"
},
{
"id": "t08_27",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 1700
},
"values": {
"value": "${pending + (case_2[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t08_18",
"slot": "except_fn"
},
{
"id": "t08_28",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2082
},
"values": {
"msg": "用例结果:${json(case_2)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t08_29",
"componentId": "logic_control_try_catch",
"label": "08-03 · System_DeleteCredential",
"position": {
"x": 220,
"y": 2224
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t08_30",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 2060
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t08_29",
"slot": "try_fn"
},
{
"id": "t08_31",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 2060
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t08_30",
"slot": "statement_else"
},
{
"id": "t08_32",
"componentId": "System_DeleteCredential",
"label": "System_DeleteCredential",
"position": {
"x": 220,
"y": 2060
},
"values": {
"application": "${credentialTarget}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "actual_3"
},
"parentId": "t08_30",
"slot": "statement_if"
},
{
"id": "t08_33",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 2060
},
"values": {
"value": "${[\"08-03\", \"System_DeleteCredential\", \"MANUAL\", \"{\\\"application\\\":\\\"${credentialTarget}\\\"}\", \"删除刚创建的测试目标,之后人工确认不存在\", actual_3]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_3"
},
"parentId": "t08_30",
"slot": "statement_if"
},
{
"id": "t08_34",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 2060
},
"values": {
"value": "${failures + (case_3[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t08_30",
"slot": "statement_if"
},
{
"id": "t08_35",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 2060
},
"values": {
"value": "${pending + (case_3[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t08_30",
"slot": "statement_if"
},
{
"id": "t08_36",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 2060
},
"values": {
"value": "${[\"08-03\", \"System_DeleteCredential\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{\\\"application\\\":\\\"${credentialTarget}\\\"}\", \"删除刚创建的测试目标,之后人工确认不存在\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_3"
},
"parentId": "t08_29",
"slot": "except_fn"
},
{
"id": "t08_37",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 2060
},
"values": {
"value": "${failures + (case_3[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t08_29",
"slot": "except_fn"
},
{
"id": "t08_38",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 2060
},
"values": {
"value": "${pending + (case_3[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t08_29",
"slot": "except_fn"
},
{
"id": "t08_39",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2728
},
"values": {
"msg": "用例结果:${json(case_3)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t08_40",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2870
},
"values": {
"msg": "本组汇总:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t08_41",
"componentId": "logic_control_if_else",
"label": "汇总判定",
"position": {
"x": 220,
"y": 3012
},
"values": {
"condition": "${failures > 0 || pending > 0 || blocked > 0}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t08_42",
"componentId": "ExceptionUtil_Throws",
"label": "如实标记未通过",
"position": {
"x": 220,
"y": 2600
},
"values": {
"msg": "组件测试未全部通过:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。请查看日志。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t08_41",
"slot": "statement_if"
},
{
"id": "t08_43",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2600
},
"values": {
"msg": "本组全部通过。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t08_41",
"slot": "statement_else"
}
],
"edges": [
{
"id": "e_t08_2",
"source": "t08_1",
"target": "t08_2"
},
{
"id": "e_t08_3",
"source": "t08_2",
"target": "t08_3"
},
{
"id": "e_t08_4",
"source": "t08_3",
"target": "t08_4"
},
{
"id": "e_t08_5",
"source": "t08_4",
"target": "t08_5"
},
{
"id": "e_t08_6",
"source": "t08_5",
"target": "t08_6"
},
{
"id": "e_t08_7",
"source": "t08_6",
"target": "t08_7"
},
{
"id": "e_t08_17",
"source": "t08_7",
"target": "t08_17"
},
{
"id": "e_t08_18",
"source": "t08_17",
"target": "t08_18"
},
{
"id": "e_t08_28",
"source": "t08_18",
"target": "t08_28"
},
{
"id": "e_t08_29",
"source": "t08_28",
"target": "t08_29"
},
{
"id": "e_t08_39",
"source": "t08_29",
"target": "t08_39"
},
{
"id": "e_t08_40",
"source": "t08_39",
"target": "t08_40"
},
{
"id": "e_t08_41",
"source": "t08_40",
"target": "t08_41"
}
],
"meta": {
"createdAt": "2026-10-30T00:00:00.000Z",
"updatedAt": "2026-10-30T00:00:00.000Z",
"appVersion": "0.1.0"
}
}
@@ -0,0 +1,870 @@
{
"schemaVersion": 1,
"id": "test_appsystem_09",
"name": "组件测试 09 · 输入法【手动】",
"description": "手动测试:先阅读测试说明。默认不开启执行开关,不能把组件返回成功当作功能通过。",
"enabled": true,
"trigger": {
"type": "manual",
"label": "手动运行"
},
"variables": [],
"nodes": [
{
"id": "t09_1",
"componentId": "Trigger.Manual",
"label": "人工发起",
"position": {
"x": 220,
"y": 80
},
"values": {
"entryName": "开始组件测试"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t09_2",
"componentId": "Basic_SetVariable",
"label": "初始化失败计数",
"position": {
"x": 220,
"y": 222
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
}
},
{
"id": "t09_3",
"componentId": "Basic_SetVariable",
"label": "初始化待确认计数",
"position": {
"x": 220,
"y": 364
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
}
},
{
"id": "t09_4",
"componentId": "Basic_SetVariable",
"label": "初始化阻塞计数",
"position": {
"x": 220,
"y": 506
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "blocked"
}
},
{
"id": "t09_5",
"componentId": "Basic_SetVariable",
"label": "手动执行开关:确认环境后才可改为 true",
"position": {
"x": 220,
"y": 648
},
"values": {
"value": false
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "manualEnabled"
}
},
{
"id": "t09_6",
"componentId": "logic_control_try_catch",
"label": "09-01 · System_GetInputMethodState",
"position": {
"x": 220,
"y": 790
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t09_7",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 1160
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t09_6",
"slot": "try_fn"
},
{
"id": "t09_8",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 1160
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t09_7",
"slot": "statement_else"
},
{
"id": "t09_9",
"componentId": "System_GetInputMethodState",
"label": "System_GetInputMethodState",
"position": {
"x": 220,
"y": 1160
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "originalIme"
},
"parentId": "t09_7",
"slot": "statement_if"
},
{
"id": "t09_10",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${[\"09-01\", \"System_GetInputMethodState\", \"MANUAL\", \"{}\", \"读取前台窗口的真实输入法状态,人工对照任务栏\", originalIme]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_1"
},
"parentId": "t09_7",
"slot": "statement_if"
},
{
"id": "t09_11",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${failures + (case_1[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t09_7",
"slot": "statement_if"
},
{
"id": "t09_12",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${pending + (case_1[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t09_7",
"slot": "statement_if"
},
{
"id": "t09_13",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${[\"09-01\", \"System_GetInputMethodState\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{}\", \"读取前台窗口的真实输入法状态,人工对照任务栏\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_1"
},
"parentId": "t09_6",
"slot": "except_fn"
},
{
"id": "t09_14",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${failures + (case_1[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t09_6",
"slot": "except_fn"
},
{
"id": "t09_15",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${pending + (case_1[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t09_6",
"slot": "except_fn"
},
{
"id": "t09_16",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 1294
},
"values": {
"msg": "用例结果:${json(case_1)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t09_17",
"componentId": "logic_control_try_catch",
"label": "09-02 · System_SetInputMethodState",
"position": {
"x": 220,
"y": 1436
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t09_18",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 1520
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t09_17",
"slot": "try_fn"
},
{
"id": "t09_19",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 1520
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t09_18",
"slot": "statement_else"
},
{
"id": "t09_20",
"componentId": "System_SetInputMethodState",
"label": "System_SetInputMethodState",
"position": {
"x": 220,
"y": 1520
},
"values": {
"mode": "en-US"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "actual_2"
},
"parentId": "t09_18",
"slot": "statement_if"
},
{
"id": "t09_21",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${[\"09-02\", \"System_SetInputMethodState\", \"MANUAL\", \"{\\\"mode\\\":\\\"en-US\\\"}\", \"前台编辑器应切换到英文模式;仅子进程返回 set:true 不能算通过\", actual_2]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_2"
},
"parentId": "t09_18",
"slot": "statement_if"
},
{
"id": "t09_22",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${failures + (case_2[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t09_18",
"slot": "statement_if"
},
{
"id": "t09_23",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${pending + (case_2[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t09_18",
"slot": "statement_if"
},
{
"id": "t09_24",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${[\"09-02\", \"System_SetInputMethodState\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{\\\"mode\\\":\\\"en-US\\\"}\", \"前台编辑器应切换到英文模式;仅子进程返回 set:true 不能算通过\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_2"
},
"parentId": "t09_17",
"slot": "except_fn"
},
{
"id": "t09_25",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${failures + (case_2[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t09_17",
"slot": "except_fn"
},
{
"id": "t09_26",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${pending + (case_2[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t09_17",
"slot": "except_fn"
},
{
"id": "t09_27",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 1940
},
"values": {
"msg": "用例结果:${json(case_2)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t09_28",
"componentId": "logic_control_try_catch",
"label": "09-03 · System_SetInputMethodState",
"position": {
"x": 220,
"y": 2082
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t09_29",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 1880
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t09_28",
"slot": "try_fn"
},
{
"id": "t09_30",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 1880
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t09_29",
"slot": "statement_else"
},
{
"id": "t09_31",
"componentId": "System_SetInputMethodState",
"label": "System_SetInputMethodState",
"position": {
"x": 220,
"y": 1880
},
"values": {
"mode": "${originalIme.culture}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "actual_3"
},
"parentId": "t09_29",
"slot": "statement_if"
},
{
"id": "t09_32",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${[\"09-03\", \"System_SetInputMethodState\", \"MANUAL\", \"{\\\"mode\\\":\\\"${originalIme.culture}\\\"}\", \"恢复原输入法;人工确认前台窗口的实际状态\", actual_3]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_3"
},
"parentId": "t09_29",
"slot": "statement_if"
},
{
"id": "t09_33",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${failures + (case_3[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t09_29",
"slot": "statement_if"
},
{
"id": "t09_34",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${pending + (case_3[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t09_29",
"slot": "statement_if"
},
{
"id": "t09_35",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${[\"09-03\", \"System_SetInputMethodState\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{\\\"mode\\\":\\\"${originalIme.culture}\\\"}\", \"恢复原输入法;人工确认前台窗口的实际状态\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_3"
},
"parentId": "t09_28",
"slot": "except_fn"
},
{
"id": "t09_36",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${failures + (case_3[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t09_28",
"slot": "except_fn"
},
{
"id": "t09_37",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${pending + (case_3[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t09_28",
"slot": "except_fn"
},
{
"id": "t09_38",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2586
},
"values": {
"msg": "用例结果:${json(case_3)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t09_39",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2728
},
"values": {
"msg": "本组汇总:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t09_40",
"componentId": "logic_control_if_else",
"label": "汇总判定",
"position": {
"x": 220,
"y": 2870
},
"values": {
"condition": "${failures > 0 || pending > 0 || blocked > 0}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t09_41",
"componentId": "ExceptionUtil_Throws",
"label": "如实标记未通过",
"position": {
"x": 220,
"y": 2420
},
"values": {
"msg": "组件测试未全部通过:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。请查看日志。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t09_40",
"slot": "statement_if"
},
{
"id": "t09_42",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2420
},
"values": {
"msg": "本组全部通过。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t09_40",
"slot": "statement_else"
}
],
"edges": [
{
"id": "e_t09_2",
"source": "t09_1",
"target": "t09_2"
},
{
"id": "e_t09_3",
"source": "t09_2",
"target": "t09_3"
},
{
"id": "e_t09_4",
"source": "t09_3",
"target": "t09_4"
},
{
"id": "e_t09_5",
"source": "t09_4",
"target": "t09_5"
},
{
"id": "e_t09_6",
"source": "t09_5",
"target": "t09_6"
},
{
"id": "e_t09_16",
"source": "t09_6",
"target": "t09_16"
},
{
"id": "e_t09_17",
"source": "t09_16",
"target": "t09_17"
},
{
"id": "e_t09_27",
"source": "t09_17",
"target": "t09_27"
},
{
"id": "e_t09_28",
"source": "t09_27",
"target": "t09_28"
},
{
"id": "e_t09_38",
"source": "t09_28",
"target": "t09_38"
},
{
"id": "e_t09_39",
"source": "t09_38",
"target": "t09_39"
},
{
"id": "e_t09_40",
"source": "t09_39",
"target": "t09_40"
}
],
"meta": {
"createdAt": "2026-10-30T00:00:00.000Z",
"updatedAt": "2026-10-30T00:00:00.000Z",
"appVersion": "0.1.0"
}
}
@@ -0,0 +1,455 @@
{
"schemaVersion": 1,
"id": "test_appsystem_10",
"name": "组件测试 10 · 音频【手动】",
"description": "手动测试:先阅读测试说明。默认不开启执行开关,不能把组件返回成功当作功能通过。",
"enabled": true,
"trigger": {
"type": "manual",
"label": "手动运行"
},
"variables": [],
"nodes": [
{
"id": "t10_1",
"componentId": "Trigger.Manual",
"label": "人工发起",
"position": {
"x": 220,
"y": 80
},
"values": {
"entryName": "开始组件测试"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t10_2",
"componentId": "Basic_SetVariable",
"label": "初始化失败计数",
"position": {
"x": 220,
"y": 222
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
}
},
{
"id": "t10_3",
"componentId": "Basic_SetVariable",
"label": "初始化待确认计数",
"position": {
"x": 220,
"y": 364
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
}
},
{
"id": "t10_4",
"componentId": "Basic_SetVariable",
"label": "初始化阻塞计数",
"position": {
"x": 220,
"y": 506
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "blocked"
}
},
{
"id": "t10_5",
"componentId": "Basic_SetVariable",
"label": "手动执行开关:确认环境后才可改为 true",
"position": {
"x": 220,
"y": 648
},
"values": {
"value": false
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "manualEnabled"
}
},
{
"id": "t10_6",
"componentId": "System_ExecuteCommand",
"label": "准备 0.3 秒低音量测试音",
"position": {
"x": 220,
"y": 790
},
"values": {
"action": "$dir=Join-Path ([IO.Path]::GetTempPath()) ('RPA-AppSystem-Tests\\'+[Guid]::NewGuid().ToString('N')); [IO.Directory]::CreateDirectory($dir) | Out-Null; $wav=Join-Path $dir 'tone.wav'; [IO.File]::WriteAllBytes($wav,[Convert]::FromBase64String('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 truncated
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "audioPath"
}
},
{
"id": "t10_7",
"componentId": "logic_control_try_catch",
"label": "10-01 · System_PlaySound",
"position": {
"x": 220,
"y": 932
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t10_8",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 1340
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t10_7",
"slot": "try_fn"
},
{
"id": "t10_9",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 1340
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t10_8",
"slot": "statement_else"
},
{
"id": "t10_10",
"componentId": "System_PlaySound",
"label": "System_PlaySound",
"position": {
"x": 220,
"y": 1340
},
"values": {
"audio": "${audioPath}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "actual_1"
},
"parentId": "t10_8",
"slot": "statement_if"
},
{
"id": "t10_11",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${[\"10-01\", \"System_PlaySound\", \"MANUAL\", \"{\\\"audio\\\":\\\"${audioPath}\\\"}\", \"听到一次短提示音;没有声音不能算通过\", actual_1]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_1"
},
"parentId": "t10_8",
"slot": "statement_if"
},
{
"id": "t10_12",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${failures + (case_1[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t10_8",
"slot": "statement_if"
},
{
"id": "t10_13",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${pending + (case_1[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t10_8",
"slot": "statement_if"
},
{
"id": "t10_14",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${[\"10-01\", \"System_PlaySound\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{\\\"audio\\\":\\\"${audioPath}\\\"}\", \"听到一次短提示音;没有声音不能算通过\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_1"
},
"parentId": "t10_7",
"slot": "except_fn"
},
{
"id": "t10_15",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${failures + (case_1[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t10_7",
"slot": "except_fn"
},
{
"id": "t10_16",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 1340
},
"values": {
"value": "${pending + (case_1[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t10_7",
"slot": "except_fn"
},
{
"id": "t10_17",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 1436
},
"values": {
"msg": "用例结果:${json(case_1)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t10_18",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 1578
},
"values": {
"msg": "本组汇总:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t10_19",
"componentId": "logic_control_if_else",
"label": "汇总判定",
"position": {
"x": 220,
"y": 1720
},
"values": {
"condition": "${failures > 0 || pending > 0 || blocked > 0}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t10_20",
"componentId": "ExceptionUtil_Throws",
"label": "如实标记未通过",
"position": {
"x": 220,
"y": 1880
},
"values": {
"msg": "组件测试未全部通过:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。请查看日志。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t10_19",
"slot": "statement_if"
},
{
"id": "t10_21",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 1880
},
"values": {
"msg": "本组全部通过。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t10_19",
"slot": "statement_else"
}
],
"edges": [
{
"id": "e_t10_2",
"source": "t10_1",
"target": "t10_2"
},
{
"id": "e_t10_3",
"source": "t10_2",
"target": "t10_3"
},
{
"id": "e_t10_4",
"source": "t10_3",
"target": "t10_4"
},
{
"id": "e_t10_5",
"source": "t10_4",
"target": "t10_5"
},
{
"id": "e_t10_6",
"source": "t10_5",
"target": "t10_6"
},
{
"id": "e_t10_7",
"source": "t10_6",
"target": "t10_7"
},
{
"id": "e_t10_17",
"source": "t10_7",
"target": "t10_17"
},
{
"id": "e_t10_18",
"source": "t10_17",
"target": "t10_18"
},
{
"id": "e_t10_19",
"source": "t10_18",
"target": "t10_19"
}
],
"meta": {
"createdAt": "2026-10-30T00:00:00.000Z",
"updatedAt": "2026-10-30T00:00:00.000Z",
"appVersion": "0.1.0"
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,654 @@
{
"schemaVersion": 1,
"id": "test_appsystem_12",
"name": "组件测试 12 · 锁屏与解锁【手动】",
"description": "手动测试:先阅读测试说明。默认不开启执行开关,不能把组件返回成功当作功能通过。",
"enabled": true,
"trigger": {
"type": "manual",
"label": "手动运行"
},
"variables": [],
"nodes": [
{
"id": "t12_1",
"componentId": "Trigger.Manual",
"label": "人工发起",
"position": {
"x": 220,
"y": 80
},
"values": {
"entryName": "开始组件测试"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t12_2",
"componentId": "Basic_SetVariable",
"label": "初始化失败计数",
"position": {
"x": 220,
"y": 222
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
}
},
{
"id": "t12_3",
"componentId": "Basic_SetVariable",
"label": "初始化待确认计数",
"position": {
"x": 220,
"y": 364
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
}
},
{
"id": "t12_4",
"componentId": "Basic_SetVariable",
"label": "初始化阻塞计数",
"position": {
"x": 220,
"y": 506
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "blocked"
}
},
{
"id": "t12_5",
"componentId": "Basic_SetVariable",
"label": "手动执行开关:确认环境后才可改为 true",
"position": {
"x": 220,
"y": 648
},
"values": {
"value": false
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "manualEnabled"
}
},
{
"id": "t12_6",
"componentId": "logic_control_try_catch",
"label": "12-01 · ScreenControl_Screenlock",
"position": {
"x": 220,
"y": 790
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t12_7",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 1160
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t12_6",
"slot": "try_fn"
},
{
"id": "t12_8",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 1160
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t12_7",
"slot": "statement_else"
},
{
"id": "t12_9",
"componentId": "ScreenControl_Screenlock",
"label": "ScreenControl_Screenlock",
"position": {
"x": 220,
"y": 1160
},
"values": {
"username": "",
"pwd": "",
"width": "",
"height": "",
"scale_factor": "100"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "actual_1"
},
"parentId": "t12_7",
"slot": "statement_if"
},
{
"id": "t12_10",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${[\"12-01\", \"ScreenControl_Screenlock\", \"MANUAL\", \"{\\\"username\\\":\\\"\\\",\\\"pwd\\\":\\\"\\\",\\\"width\\\":\\\"\\\",\\\"height\\\":\\\"\\\",\\\"scale_factor\\\":\\\"100\\\"}\", \"实际锁屏;需要人在机器旁用 Windows 登录凭据恢复,不改变账户密码\", actual_1]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_1"
},
"parentId": "t12_7",
"slot": "statement_if"
},
{
"id": "t12_11",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${failures + (case_1[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t12_7",
"slot": "statement_if"
},
{
"id": "t12_12",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${pending + (case_1[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t12_7",
"slot": "statement_if"
},
{
"id": "t12_13",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${[\"12-01\", \"ScreenControl_Screenlock\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{\\\"username\\\":\\\"\\\",\\\"pwd\\\":\\\"\\\",\\\"width\\\":\\\"\\\",\\\"height\\\":\\\"\\\",\\\"scale_factor\\\":\\\"100\\\"}\", \"实际锁屏;需要人在机器旁用 Windows 登录凭据恢复,不改变账户密码\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_1"
},
"parentId": "t12_6",
"slot": "except_fn"
},
{
"id": "t12_14",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${failures + (case_1[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t12_6",
"slot": "except_fn"
},
{
"id": "t12_15",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 1160
},
"values": {
"value": "${pending + (case_1[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t12_6",
"slot": "except_fn"
},
{
"id": "t12_16",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 1294
},
"values": {
"msg": "用例结果:${json(case_1)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t12_17",
"componentId": "logic_control_try_catch",
"label": "12-02 · ScreenControl_ScreenUnlock",
"position": {
"x": 220,
"y": 1436
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t12_18",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 1520
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t12_17",
"slot": "try_fn"
},
{
"id": "t12_19",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 1520
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t12_18",
"slot": "statement_else"
},
{
"id": "t12_20",
"componentId": "ScreenControl_ScreenUnlock",
"label": "ScreenControl_ScreenUnlock",
"position": {
"x": 220,
"y": 1520
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "actual_2"
},
"parentId": "t12_18",
"slot": "statement_if"
},
{
"id": "t12_21",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${[\"12-02\", \"ScreenControl_ScreenUnlock\", \"MANUAL\", \"{}\", \"仅尝试唤醒屏幕,loginUnlockSupported 必须为 false;Windows 登录仍需人工完成\", actual_2]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_2"
},
"parentId": "t12_18",
"slot": "statement_if"
},
{
"id": "t12_22",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${failures + (case_2[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t12_18",
"slot": "statement_if"
},
{
"id": "t12_23",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${pending + (case_2[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t12_18",
"slot": "statement_if"
},
{
"id": "t12_24",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${[\"12-02\", \"ScreenControl_ScreenUnlock\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{}\", \"仅尝试唤醒屏幕,loginUnlockSupported 必须为 false;Windows 登录仍需人工完成\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_2"
},
"parentId": "t12_17",
"slot": "except_fn"
},
{
"id": "t12_25",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${failures + (case_2[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t12_17",
"slot": "except_fn"
},
{
"id": "t12_26",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${pending + (case_2[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t12_17",
"slot": "except_fn"
},
{
"id": "t12_27",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 1940
},
"values": {
"msg": "用例结果:${json(case_2)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t12_28",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2082
},
"values": {
"msg": "本组汇总:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t12_29",
"componentId": "logic_control_if_else",
"label": "汇总判定",
"position": {
"x": 220,
"y": 2224
},
"values": {
"condition": "${failures > 0 || pending > 0 || blocked > 0}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t12_30",
"componentId": "ExceptionUtil_Throws",
"label": "如实标记未通过",
"position": {
"x": 220,
"y": 2060
},
"values": {
"msg": "组件测试未全部通过:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。请查看日志。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t12_29",
"slot": "statement_if"
},
{
"id": "t12_31",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2060
},
"values": {
"msg": "本组全部通过。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t12_29",
"slot": "statement_else"
}
],
"edges": [
{
"id": "e_t12_2",
"source": "t12_1",
"target": "t12_2"
},
{
"id": "e_t12_3",
"source": "t12_2",
"target": "t12_3"
},
{
"id": "e_t12_4",
"source": "t12_3",
"target": "t12_4"
},
{
"id": "e_t12_5",
"source": "t12_4",
"target": "t12_5"
},
{
"id": "e_t12_6",
"source": "t12_5",
"target": "t12_6"
},
{
"id": "e_t12_16",
"source": "t12_6",
"target": "t12_16"
},
{
"id": "e_t12_17",
"source": "t12_16",
"target": "t12_17"
},
{
"id": "e_t12_27",
"source": "t12_17",
"target": "t12_27"
},
{
"id": "e_t12_28",
"source": "t12_27",
"target": "t12_28"
},
{
"id": "e_t12_29",
"source": "t12_28",
"target": "t12_29"
}
],
"meta": {
"createdAt": "2026-10-30T00:00:00.000Z",
"updatedAt": "2026-10-30T00:00:00.000Z",
"appVersion": "0.1.0"
}
}
@@ -0,0 +1,735 @@
{
"schemaVersion": 1,
"id": "test_appsystem_13",
"name": "组件测试 13 · 远程桌面【手动】",
"description": "手动测试:先阅读测试说明。默认不开启执行开关,不能把组件返回成功当作功能通过。",
"enabled": true,
"trigger": {
"type": "manual",
"label": "手动运行"
},
"variables": [],
"nodes": [
{
"id": "t13_1",
"componentId": "Trigger.Manual",
"label": "人工发起",
"position": {
"x": 220,
"y": 80
},
"values": {
"entryName": "开始组件测试"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t13_2",
"componentId": "Basic_SetVariable",
"label": "初始化失败计数",
"position": {
"x": 220,
"y": 222
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
}
},
{
"id": "t13_3",
"componentId": "Basic_SetVariable",
"label": "初始化待确认计数",
"position": {
"x": 220,
"y": 364
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
}
},
{
"id": "t13_4",
"componentId": "Basic_SetVariable",
"label": "初始化阻塞计数",
"position": {
"x": 220,
"y": 506
},
"values": {
"value": 0
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "blocked"
}
},
{
"id": "t13_5",
"componentId": "Basic_SetVariable",
"label": "手动执行开关:确认环境后才可改为 true",
"position": {
"x": 220,
"y": 648
},
"values": {
"value": false
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "manualEnabled"
}
},
{
"id": "t13_6",
"componentId": "Basic_SetVariable",
"label": "填写用户自己的测试远程地址",
"position": {
"x": 220,
"y": 790
},
"values": {
"value": ""
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "remoteAddress"
}
},
{
"id": "t13_7",
"componentId": "Basic_SetVariable",
"label": "断连单独开关:可能断开当前 Windows 会话,必须另行确认",
"position": {
"x": 220,
"y": 932
},
"values": {
"value": false
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "allowDisconnect"
}
},
{
"id": "t13_8",
"componentId": "logic_control_try_catch",
"label": "13-01 · System_ConnectRemoteDesktop",
"position": {
"x": 220,
"y": 1074
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t13_9",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 1520
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t13_8",
"slot": "try_fn"
},
{
"id": "t13_10",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 1520
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t13_9",
"slot": "statement_else"
},
{
"id": "t13_11",
"componentId": "System_ConnectRemoteDesktop",
"label": "System_ConnectRemoteDesktop",
"position": {
"x": 220,
"y": 1520
},
"values": {
"ip": "${remoteAddress}",
"port": "3389"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "actual_1"
},
"parentId": "t13_9",
"slot": "statement_if"
},
{
"id": "t13_12",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${[\"13-01\", \"System_ConnectRemoteDesktop\", \"MANUAL\", \"{\\\"ip\\\":\\\"${remoteAddress}\\\",\\\"port\\\":\\\"3389\\\"}\", \"人工完成登录,并确认已连接到正确测试机器;启动 mstsc 不等于连接成功\", actual_1]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_1"
},
"parentId": "t13_9",
"slot": "statement_if"
},
{
"id": "t13_13",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${failures + (case_1[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t13_9",
"slot": "statement_if"
},
{
"id": "t13_14",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${pending + (case_1[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t13_9",
"slot": "statement_if"
},
{
"id": "t13_15",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${[\"13-01\", \"System_ConnectRemoteDesktop\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{\\\"ip\\\":\\\"${remoteAddress}\\\",\\\"port\\\":\\\"3389\\\"}\", \"人工完成登录,并确认已连接到正确测试机器;启动 mstsc 不等于连接成功\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_1"
},
"parentId": "t13_8",
"slot": "except_fn"
},
{
"id": "t13_16",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${failures + (case_1[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t13_8",
"slot": "except_fn"
},
{
"id": "t13_17",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 1520
},
"values": {
"value": "${pending + (case_1[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t13_8",
"slot": "except_fn"
},
{
"id": "t13_18",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 1578
},
"values": {
"msg": "用例结果:${json(case_1)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t13_19",
"componentId": "logic_control_try_catch",
"label": "13-02 · System_CloseRemoteDesktop",
"position": {
"x": 220,
"y": 1720
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t13_20",
"componentId": "logic_control_if_else",
"label": "手动执行保护",
"position": {
"x": 220,
"y": 1880
},
"values": {
"condition": "${manualEnabled === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t13_19",
"slot": "try_fn"
},
{
"id": "t13_21",
"componentId": "ExceptionUtil_Throws",
"label": "默认不执行系统状态操作",
"position": {
"x": 220,
"y": 1880
},
"values": {
"msg": "待人工确认:执行开关未开启"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t13_20",
"slot": "statement_else"
},
{
"id": "t13_30",
"componentId": "logic_control_if_else",
"label": "断连操作单独保护",
"position": {
"x": 220,
"y": 2060
},
"values": {
"condition": "${allowDisconnect === true}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t13_20",
"slot": "statement_if"
},
{
"id": "t13_22",
"componentId": "System_CloseRemoteDesktop",
"label": "System_CloseRemoteDesktop",
"position": {
"x": 220,
"y": 1880
},
"values": {},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "actual_2"
},
"parentId": "t13_30",
"slot": "statement_if"
},
{
"id": "t13_23",
"componentId": "Basic_SetVariable",
"label": "记录实际值与判定",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${[\"13-02\", \"System_CloseRemoteDesktop\", \"MANUAL\", \"{}\", \"确认目标会话及恢复方式后才能执行;当前实现会调用 tsdiscon\", actual_2]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_2"
},
"parentId": "t13_20",
"slot": "statement_if"
},
{
"id": "t13_24",
"componentId": "Basic_SetVariable",
"label": "累计失败数",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${failures + (case_2[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t13_20",
"slot": "statement_if"
},
{
"id": "t13_25",
"componentId": "Basic_SetVariable",
"label": "累计待人工确认数",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${pending + (case_2[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t13_20",
"slot": "statement_if"
},
{
"id": "t13_26",
"componentId": "Basic_SetVariable",
"label": "记录异常结果",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${[\"13-02\", \"System_CloseRemoteDesktop\", manualEnabled === true ? \"FAIL\" : \"MANUAL\", \"{}\", \"确认目标会话及恢复方式后才能执行;当前实现会调用 tsdiscon\", error.reason]}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "case_2"
},
"parentId": "t13_19",
"slot": "except_fn"
},
{
"id": "t13_27",
"componentId": "Basic_SetVariable",
"label": "异常累计失败数",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${failures + (case_2[2] === \"FAIL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "failures"
},
"parentId": "t13_19",
"slot": "except_fn"
},
{
"id": "t13_28",
"componentId": "Basic_SetVariable",
"label": "异常累计待确认数",
"position": {
"x": 220,
"y": 1880
},
"values": {
"value": "${pending + (case_2[2] === \"MANUAL\" ? 1 : 0)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false,
"outputVar": "pending"
},
"parentId": "t13_19",
"slot": "except_fn"
},
{
"id": "t13_29",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2224
},
"values": {
"msg": "用例结果:${json(case_2)}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t13_31",
"componentId": "ExceptionUtil_Throws",
"label": "阻止未授权断连",
"position": {
"x": 220,
"y": 2060
},
"values": {
"msg": "阻塞:断连开关未开启;执行可能中断当前会话。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t13_30",
"slot": "statement_else"
},
{
"id": "t13_32",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2366
},
"values": {
"msg": "本组汇总:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t13_33",
"componentId": "logic_control_if_else",
"label": "汇总判定",
"position": {
"x": 220,
"y": 2508
},
"values": {
"condition": "${failures > 0 || pending > 0 || blocked > 0}"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
}
},
{
"id": "t13_34",
"componentId": "ExceptionUtil_Throws",
"label": "如实标记未通过",
"position": {
"x": 220,
"y": 2420
},
"values": {
"msg": "组件测试未全部通过:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。请查看日志。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t13_33",
"slot": "statement_if"
},
{
"id": "t13_35",
"componentId": "Log_Info",
"label": "输出测试结果",
"position": {
"x": 220,
"y": 2420
},
"values": {
"msg": "本组全部通过。"
},
"options": {
"timeoutMs": 15000,
"retryCount": 0,
"logException": false
},
"parentId": "t13_33",
"slot": "statement_else"
}
],
"edges": [
{
"id": "e_t13_2",
"source": "t13_1",
"target": "t13_2"
},
{
"id": "e_t13_3",
"source": "t13_2",
"target": "t13_3"
},
{
"id": "e_t13_4",
"source": "t13_3",
"target": "t13_4"
},
{
"id": "e_t13_5",
"source": "t13_4",
"target": "t13_5"
},
{
"id": "e_t13_6",
"source": "t13_5",
"target": "t13_6"
},
{
"id": "e_t13_7",
"source": "t13_6",
"target": "t13_7"
},
{
"id": "e_t13_8",
"source": "t13_7",
"target": "t13_8"
},
{
"id": "e_t13_18",
"source": "t13_8",
"target": "t13_18"
},
{
"id": "e_t13_19",
"source": "t13_18",
"target": "t13_19"
},
{
"id": "e_t13_29",
"source": "t13_19",
"target": "t13_29"
},
{
"id": "e_t13_32",
"source": "t13_29",
"target": "t13_32"
},
{
"id": "e_t13_33",
"source": "t13_32",
"target": "t13_33"
}
],
"meta": {
"createdAt": "2026-10-30T00:00:00.000Z",
"updatedAt": "2026-10-30T00:00:00.000Z",
"appVersion": "0.1.0"
}
}