{ "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" } }