{ "schemaVersion": 1, "id": "test_appsystem_01", "name": "组件测试 01 · 应用与 PID", "description": "查看运行日志中的用例结果;有失败时任务最终显示失败,其他用例仍继续。", "enabled": true, "trigger": { "type": "manual", "label": "手动运行" }, "variables": [], "nodes": [ { "id": "t01_1", "componentId": "Trigger.Manual", "label": "人工发起", "position": { "x": 220, "y": 80 }, "values": { "entryName": "开始组件测试" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_2", "componentId": "Basic_SetVariable", "label": "初始化失败计数", "position": { "x": 220, "y": 222 }, "values": { "value": 0 }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" } }, { "id": "t01_3", "componentId": "Basic_SetVariable", "label": "初始化待确认计数", "position": { "x": 220, "y": 364 }, "values": { "value": 0 }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" } }, { "id": "t01_4", "componentId": "Basic_SetVariable", "label": "初始化阻塞计数", "position": { "x": 220, "y": 506 }, "values": { "value": 0 }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "blocked" } }, { "id": "t01_5", "componentId": "System_ExecuteCommand", "label": "准备唯一测试程序(90 秒自动退出)", "position": { "x": 220, "y": 648 }, "values": { "action": "$ErrorActionPreference='Stop'; $tag=[Guid]::NewGuid().ToString('N'); $dir=Join-Path ([IO.Path]::GetTempPath()) ('RPA-AppSystem-Tests\\'+$tag); [IO.Directory]::CreateDirectory($dir) | Out-Null; $name='rpatest_'+$tag.Substring(0,12); $exe=Join-Path $dir ($name+'.exe'); Add-Type -TypeDefinition 'using System; using System.Threading; public static class RpaFixture { public static void Main() { Thread.Sleep(90000); } }' -OutputAssembly $exe -OutputType ConsoleApplication; @{folder=$dir;exe=$exe;name=$name} | ConvertTo-Json -Compress" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "fixtureJson" } }, { "id": "t01_6", "componentId": "Basic_SetVariable", "label": "读取夹具路径与专用进程名", "position": { "x": 220, "y": 790 }, "values": { "value": "${parseJson(fixtureJson)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "fixture" } }, { "id": "t01_7", "componentId": "logic_control_try_catch", "label": "01-01 · App_Run", "position": { "x": 220, "y": 932 }, "values": {}, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_8", "componentId": "App_Run", "label": "App_Run", "position": { "x": 220, "y": 1340 }, "values": { "executeable": "${fixture.exe}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pid1" }, "parentId": "t01_7", "slot": "try_fn" }, { "id": "t01_9", "componentId": "Basic_SetVariable", "label": "记录实际值与判定", "position": { "x": 220, "y": 1340 }, "values": { "value": "${[\"01-01\", \"App_Run\", (pid1 > 0) ? \"PASS\" : \"FAIL\", \"{\\\"executeable\\\":\\\"${fixture.exe}\\\"}\", \"第一个测试进程 PID 大于 0\", pid1]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_1" }, "parentId": "t01_7", "slot": "try_fn" }, { "id": "t01_10", "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": "t01_7", "slot": "try_fn" }, { "id": "t01_11", "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": "t01_7", "slot": "try_fn" }, { "id": "t01_12", "componentId": "Basic_SetVariable", "label": "记录异常结果", "position": { "x": 220, "y": 1340 }, "values": { "value": "${[\"01-01\", \"App_Run\", \"FAIL\", \"{\\\"executeable\\\":\\\"${fixture.exe}\\\"}\", \"第一个测试进程 PID 大于 0\", error.reason]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_1" }, "parentId": "t01_7", "slot": "except_fn" }, { "id": "t01_13", "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": "t01_7", "slot": "except_fn" }, { "id": "t01_14", "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": "t01_7", "slot": "except_fn" }, { "id": "t01_15", "componentId": "Log_Info", "label": "输出测试结果", "position": { "x": 220, "y": 1574 }, "values": { "msg": "用例结果:${json(case_1)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_16", "componentId": "logic_control_try_catch", "label": "01-02 · App_Run", "position": { "x": 220, "y": 1716 }, "values": {}, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_17", "componentId": "App_Run", "label": "App_Run", "position": { "x": 220, "y": 1700 }, "values": { "executeable": "${fixture.exe}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pid2" }, "parentId": "t01_16", "slot": "try_fn" }, { "id": "t01_18", "componentId": "Basic_SetVariable", "label": "记录实际值与判定", "position": { "x": 220, "y": 1700 }, "values": { "value": "${[\"01-02\", \"App_Run\", (pid2 > 0 && pid2 !== pid1) ? \"PASS\" : \"FAIL\", \"{\\\"executeable\\\":\\\"${fixture.exe}\\\"}\", \"第二个 PID 大于 0,且与第一个不同\", pid2]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_2" }, "parentId": "t01_16", "slot": "try_fn" }, { "id": "t01_19", "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": "t01_16", "slot": "try_fn" }, { "id": "t01_20", "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": "t01_16", "slot": "try_fn" }, { "id": "t01_21", "componentId": "Basic_SetVariable", "label": "记录异常结果", "position": { "x": 220, "y": 1700 }, "values": { "value": "${[\"01-02\", \"App_Run\", \"FAIL\", \"{\\\"executeable\\\":\\\"${fixture.exe}\\\"}\", \"第二个 PID 大于 0,且与第一个不同\", error.reason]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_2" }, "parentId": "t01_16", "slot": "except_fn" }, { "id": "t01_22", "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": "t01_16", "slot": "except_fn" }, { "id": "t01_23", "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": "t01_16", "slot": "except_fn" }, { "id": "t01_24", "componentId": "Log_Info", "label": "输出测试结果", "position": { "x": 220, "y": 2358 }, "values": { "msg": "用例结果:${json(case_2)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_25", "componentId": "logic_control_try_catch", "label": "01-03 · App_GetPid", "position": { "x": 220, "y": 2500 }, "values": {}, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_26", "componentId": "App_GetPid", "label": "App_GetPid", "position": { "x": 220, "y": 2060 }, "values": { "pattern": "${fixture.name}.exe" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "actual_3" }, "parentId": "t01_25", "slot": "try_fn" }, { "id": "t01_27", "componentId": "Basic_SetVariable", "label": "记录实际值与判定", "position": { "x": 220, "y": 2060 }, "values": { "value": "${[\"01-03\", \"App_GetPid\", (actual_3 === pid1 || actual_3 === pid2) ? \"PASS\" : \"FAIL\", \"{\\\"pattern\\\":\\\"${fixture.name}.exe\\\"}\", \"返回本次创建的任一 PID\", actual_3]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_3" }, "parentId": "t01_25", "slot": "try_fn" }, { "id": "t01_28", "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": "t01_25", "slot": "try_fn" }, { "id": "t01_29", "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": "t01_25", "slot": "try_fn" }, { "id": "t01_30", "componentId": "Basic_SetVariable", "label": "记录异常结果", "position": { "x": 220, "y": 2060 }, "values": { "value": "${[\"01-03\", \"App_GetPid\", \"FAIL\", \"{\\\"pattern\\\":\\\"${fixture.name}.exe\\\"}\", \"返回本次创建的任一 PID\", error.reason]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_3" }, "parentId": "t01_25", "slot": "except_fn" }, { "id": "t01_31", "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": "t01_25", "slot": "except_fn" }, { "id": "t01_32", "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": "t01_25", "slot": "except_fn" }, { "id": "t01_33", "componentId": "Log_Info", "label": "输出测试结果", "position": { "x": 220, "y": 3142 }, "values": { "msg": "用例结果:${json(case_3)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_34", "componentId": "logic_control_try_catch", "label": "01-04 · App_GetPids", "position": { "x": 220, "y": 3284 }, "values": {}, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_35", "componentId": "App_GetPids", "label": "App_GetPids", "position": { "x": 220, "y": 2420 }, "values": { "pattern": "${fixture.name}.exe" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "actual_4" }, "parentId": "t01_34", "slot": "try_fn" }, { "id": "t01_36", "componentId": "Basic_SetVariable", "label": "记录实际值与判定", "position": { "x": 220, "y": 2420 }, "values": { "value": "${[\"01-04\", \"App_GetPids\", (len(actual_4) === 2 && ((actual_4[0] === pid1 && actual_4[1] === pid2) || (actual_4[0] === pid2 && actual_4[1] === pid1))) ? \"PASS\" : \"FAIL\", \"{\\\"pattern\\\":\\\"${fixture.name}.exe\\\"}\", \"列表恰含本次创建的两个 PID\", actual_4]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_4" }, "parentId": "t01_34", "slot": "try_fn" }, { "id": "t01_37", "componentId": "Basic_SetVariable", "label": "累计失败数", "position": { "x": 220, "y": 2420 }, "values": { "value": "${failures + (case_4[2] === \"FAIL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" }, "parentId": "t01_34", "slot": "try_fn" }, { "id": "t01_38", "componentId": "Basic_SetVariable", "label": "累计待人工确认数", "position": { "x": 220, "y": 2420 }, "values": { "value": "${pending + (case_4[2] === \"MANUAL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" }, "parentId": "t01_34", "slot": "try_fn" }, { "id": "t01_39", "componentId": "Basic_SetVariable", "label": "记录异常结果", "position": { "x": 220, "y": 2420 }, "values": { "value": "${[\"01-04\", \"App_GetPids\", \"FAIL\", \"{\\\"pattern\\\":\\\"${fixture.name}.exe\\\"}\", \"列表恰含本次创建的两个 PID\", error.reason]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_4" }, "parentId": "t01_34", "slot": "except_fn" }, { "id": "t01_40", "componentId": "Basic_SetVariable", "label": "异常累计失败数", "position": { "x": 220, "y": 2420 }, "values": { "value": "${failures + (case_4[2] === \"FAIL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" }, "parentId": "t01_34", "slot": "except_fn" }, { "id": "t01_41", "componentId": "Basic_SetVariable", "label": "异常累计待确认数", "position": { "x": 220, "y": 2420 }, "values": { "value": "${pending + (case_4[2] === \"MANUAL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" }, "parentId": "t01_34", "slot": "except_fn" }, { "id": "t01_42", "componentId": "Log_Info", "label": "输出测试结果", "position": { "x": 220, "y": 3926 }, "values": { "msg": "用例结果:${json(case_4)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_43", "componentId": "logic_control_try_catch", "label": "01-05 · App_Kill", "position": { "x": 220, "y": 4068 }, "values": {}, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_44", "componentId": "App_Kill", "label": "App_Kill", "position": { "x": 220, "y": 2780 }, "values": { "pid": "${pid1}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "actual_5" }, "parentId": "t01_43", "slot": "try_fn" }, { "id": "t01_45", "componentId": "System_ExecuteCommand", "label": "独立核对 PID 是否存活", "position": { "x": 220, "y": 2780 }, "values": { "action": "if (Get-Process -Id ${pid1} -ErrorAction SilentlyContinue) { 'true' } else { 'false' }" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "alive1" }, "parentId": "t01_43", "slot": "try_fn" }, { "id": "t01_46", "componentId": "System_ExecuteCommand", "label": "独立核对 PID 是否存活", "position": { "x": 220, "y": 2780 }, "values": { "action": "if (Get-Process -Id ${pid2} -ErrorAction SilentlyContinue) { 'true' } else { 'false' }" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "alive2" }, "parentId": "t01_43", "slot": "try_fn" }, { "id": "t01_47", "componentId": "Basic_SetVariable", "label": "记录实际值与判定", "position": { "x": 220, "y": 2780 }, "values": { "value": "${[\"01-05\", \"App_Kill\", (parseJson(alive1) === false && parseJson(alive2) === true) ? \"PASS\" : \"FAIL\", \"{\\\"pid\\\":\\\"${pid1}\\\"}\", \"结束第一个夹具 PID,第二个仍在运行\", [actual_5, parseJson(alive1), parseJson(alive2)]]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_5" }, "parentId": "t01_43", "slot": "try_fn" }, { "id": "t01_48", "componentId": "Basic_SetVariable", "label": "累计失败数", "position": { "x": 220, "y": 2780 }, "values": { "value": "${failures + (case_5[2] === \"FAIL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" }, "parentId": "t01_43", "slot": "try_fn" }, { "id": "t01_49", "componentId": "Basic_SetVariable", "label": "累计待人工确认数", "position": { "x": 220, "y": 2780 }, "values": { "value": "${pending + (case_5[2] === \"MANUAL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" }, "parentId": "t01_43", "slot": "try_fn" }, { "id": "t01_50", "componentId": "Basic_SetVariable", "label": "记录异常结果", "position": { "x": 220, "y": 2780 }, "values": { "value": "${[\"01-05\", \"App_Kill\", \"FAIL\", \"{\\\"pid\\\":\\\"${pid1}\\\"}\", \"结束第一个夹具 PID,第二个仍在运行\", error.reason]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_5" }, "parentId": "t01_43", "slot": "except_fn" }, { "id": "t01_51", "componentId": "Basic_SetVariable", "label": "异常累计失败数", "position": { "x": 220, "y": 2780 }, "values": { "value": "${failures + (case_5[2] === \"FAIL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" }, "parentId": "t01_43", "slot": "except_fn" }, { "id": "t01_52", "componentId": "Basic_SetVariable", "label": "异常累计待确认数", "position": { "x": 220, "y": 2780 }, "values": { "value": "${pending + (case_5[2] === \"MANUAL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" }, "parentId": "t01_43", "slot": "except_fn" }, { "id": "t01_53", "componentId": "Log_Info", "label": "输出测试结果", "position": { "x": 220, "y": 4802 }, "values": { "msg": "用例结果:${json(case_5)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_54", "componentId": "logic_control_try_catch", "label": "01-06 · App_KillV1", "position": { "x": 220, "y": 4944 }, "values": {}, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_55", "componentId": "App_KillV1", "label": "App_KillV1", "position": { "x": 220, "y": 3140 }, "values": { "close_type": "id", "pid": "${pid2}", "kill_all": "0" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "actual_6" }, "parentId": "t01_54", "slot": "try_fn" }, { "id": "t01_56", "componentId": "System_ExecuteCommand", "label": "独立核对 PID 是否存活", "position": { "x": 220, "y": 3140 }, "values": { "action": "if (Get-Process -Id ${pid2} -ErrorAction SilentlyContinue) { 'true' } else { 'false' }" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "aliveAfterV1" }, "parentId": "t01_54", "slot": "try_fn" }, { "id": "t01_57", "componentId": "Basic_SetVariable", "label": "记录实际值与判定", "position": { "x": 220, "y": 3140 }, "values": { "value": "${[\"01-06\", \"App_KillV1\", (parseJson(aliveAfterV1) === false) ? \"PASS\" : \"FAIL\", \"{\\\"close_type\\\":\\\"id\\\",\\\"pid\\\":\\\"${pid2}\\\",\\\"kill_all\\\":\\\"0\\\"}\", \"只填写 PID 即可结束第二个夹具进程\", [actual_6, parseJson(aliveAfterV1)]]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_6" }, "parentId": "t01_54", "slot": "try_fn" }, { "id": "t01_58", "componentId": "Basic_SetVariable", "label": "累计失败数", "position": { "x": 220, "y": 3140 }, "values": { "value": "${failures + (case_6[2] === \"FAIL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" }, "parentId": "t01_54", "slot": "try_fn" }, { "id": "t01_59", "componentId": "Basic_SetVariable", "label": "累计待人工确认数", "position": { "x": 220, "y": 3140 }, "values": { "value": "${pending + (case_6[2] === \"MANUAL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" }, "parentId": "t01_54", "slot": "try_fn" }, { "id": "t01_60", "componentId": "Basic_SetVariable", "label": "记录异常结果", "position": { "x": 220, "y": 3140 }, "values": { "value": "${[\"01-06\", \"App_KillV1\", \"FAIL\", \"{\\\"close_type\\\":\\\"id\\\",\\\"pid\\\":\\\"${pid2}\\\",\\\"kill_all\\\":\\\"0\\\"}\", \"只填写 PID 即可结束第二个夹具进程\", error.reason]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_6" }, "parentId": "t01_54", "slot": "except_fn" }, { "id": "t01_61", "componentId": "Basic_SetVariable", "label": "异常累计失败数", "position": { "x": 220, "y": 3140 }, "values": { "value": "${failures + (case_6[2] === \"FAIL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" }, "parentId": "t01_54", "slot": "except_fn" }, { "id": "t01_62", "componentId": "Basic_SetVariable", "label": "异常累计待确认数", "position": { "x": 220, "y": 3140 }, "values": { "value": "${pending + (case_6[2] === \"MANUAL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" }, "parentId": "t01_54", "slot": "except_fn" }, { "id": "t01_63", "componentId": "Log_Info", "label": "输出测试结果", "position": { "x": 220, "y": 5632 }, "values": { "msg": "用例结果:${json(case_6)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_64", "componentId": "logic_control_try_catch", "label": "01-07 · App_GetPids", "position": { "x": 220, "y": 5774 }, "values": {}, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_65", "componentId": "App_GetPids", "label": "App_GetPids", "position": { "x": 220, "y": 3500 }, "values": { "pattern": "${fixture.name}.exe" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "actual_7" }, "parentId": "t01_64", "slot": "try_fn" }, { "id": "t01_66", "componentId": "Basic_SetVariable", "label": "记录实际值与判定", "position": { "x": 220, "y": 3500 }, "values": { "value": "${[\"01-07\", \"App_GetPids\", (len(actual_7) === 0) ? \"PASS\" : \"FAIL\", \"{\\\"pattern\\\":\\\"${fixture.name}.exe\\\"}\", \"所有夹具结束后应返回空数组 []\", actual_7]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_7" }, "parentId": "t01_64", "slot": "try_fn" }, { "id": "t01_67", "componentId": "Basic_SetVariable", "label": "累计失败数", "position": { "x": 220, "y": 3500 }, "values": { "value": "${failures + (case_7[2] === \"FAIL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" }, "parentId": "t01_64", "slot": "try_fn" }, { "id": "t01_68", "componentId": "Basic_SetVariable", "label": "累计待人工确认数", "position": { "x": 220, "y": 3500 }, "values": { "value": "${pending + (case_7[2] === \"MANUAL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" }, "parentId": "t01_64", "slot": "try_fn" }, { "id": "t01_69", "componentId": "Basic_SetVariable", "label": "记录异常结果", "position": { "x": 220, "y": 3500 }, "values": { "value": "${[\"01-07\", \"App_GetPids\", \"FAIL\", \"{\\\"pattern\\\":\\\"${fixture.name}.exe\\\"}\", \"所有夹具结束后应返回空数组 []\", error.reason]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_7" }, "parentId": "t01_64", "slot": "except_fn" }, { "id": "t01_70", "componentId": "Basic_SetVariable", "label": "异常累计失败数", "position": { "x": 220, "y": 3500 }, "values": { "value": "${failures + (case_7[2] === \"FAIL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" }, "parentId": "t01_64", "slot": "except_fn" }, { "id": "t01_71", "componentId": "Basic_SetVariable", "label": "异常累计待确认数", "position": { "x": 220, "y": 3500 }, "values": { "value": "${pending + (case_7[2] === \"MANUAL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" }, "parentId": "t01_64", "slot": "except_fn" }, { "id": "t01_72", "componentId": "Log_Info", "label": "输出测试结果", "position": { "x": 220, "y": 6416 }, "values": { "msg": "用例结果:${json(case_7)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_73", "componentId": "logic_control_try_catch", "label": "01-08 · App_GetPid", "position": { "x": 220, "y": 6558 }, "values": {}, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_74", "componentId": "App_GetPid", "label": "App_GetPid", "position": { "x": 220, "y": 3860 }, "values": { "pattern": "${fixture.name}.exe" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "actual_8" }, "parentId": "t01_73", "slot": "try_fn" }, { "id": "t01_75", "componentId": "Basic_SetVariable", "label": "记录实际值与判定", "position": { "x": 220, "y": 3860 }, "values": { "value": "${[\"01-08\", \"App_GetPid\", (actual_8 === null) ? \"PASS\" : \"FAIL\", \"{\\\"pattern\\\":\\\"${fixture.name}.exe\\\"}\", \"无匹配时应返回 null\", actual_8]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_8" }, "parentId": "t01_73", "slot": "try_fn" }, { "id": "t01_76", "componentId": "Basic_SetVariable", "label": "累计失败数", "position": { "x": 220, "y": 3860 }, "values": { "value": "${failures + (case_8[2] === \"FAIL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" }, "parentId": "t01_73", "slot": "try_fn" }, { "id": "t01_77", "componentId": "Basic_SetVariable", "label": "累计待人工确认数", "position": { "x": 220, "y": 3860 }, "values": { "value": "${pending + (case_8[2] === \"MANUAL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" }, "parentId": "t01_73", "slot": "try_fn" }, { "id": "t01_78", "componentId": "Basic_SetVariable", "label": "记录异常结果", "position": { "x": 220, "y": 3860 }, "values": { "value": "${[\"01-08\", \"App_GetPid\", \"FAIL\", \"{\\\"pattern\\\":\\\"${fixture.name}.exe\\\"}\", \"无匹配时应返回 null\", error.reason]}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "case_8" }, "parentId": "t01_73", "slot": "except_fn" }, { "id": "t01_79", "componentId": "Basic_SetVariable", "label": "异常累计失败数", "position": { "x": 220, "y": 3860 }, "values": { "value": "${failures + (case_8[2] === \"FAIL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "failures" }, "parentId": "t01_73", "slot": "except_fn" }, { "id": "t01_80", "componentId": "Basic_SetVariable", "label": "异常累计待确认数", "position": { "x": 220, "y": 3860 }, "values": { "value": "${pending + (case_8[2] === \"MANUAL\" ? 1 : 0)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "pending" }, "parentId": "t01_73", "slot": "except_fn" }, { "id": "t01_81", "componentId": "Log_Info", "label": "输出测试结果", "position": { "x": 220, "y": 7200 }, "values": { "msg": "用例结果:${json(case_8)}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_82", "componentId": "System_ExecuteCommand", "label": "收尾:仅清理本次专用测试进程", "position": { "x": 220, "y": 7342 }, "values": { "action": "$ErrorActionPreference='Stop'; $fixture='${fixture.exe}'; if ((Split-Path $fixture -Leaf) -notmatch '^rpatest_[0-9a-f]{12}\\.exe$') { throw '拒绝清理非测试进程' }; Get-Process -Name '${fixture.name}' -ErrorAction SilentlyContinue | Where-Object { $_.Path -eq $fixture } | Stop-Process -Force; '测试进程清理完成'" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false, "outputVar": "cleanupResult" } }, { "id": "t01_83", "componentId": "Log_Info", "label": "输出测试结果", "position": { "x": 220, "y": 7484 }, "values": { "msg": "本组汇总:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_84", "componentId": "logic_control_if_else", "label": "汇总判定", "position": { "x": 220, "y": 7626 }, "values": { "condition": "${failures > 0 || pending > 0 || blocked > 0}" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false } }, { "id": "t01_85", "componentId": "ExceptionUtil_Throws", "label": "如实标记未通过", "position": { "x": 220, "y": 4580 }, "values": { "msg": "组件测试未全部通过:失败 ${failures} 项,阻塞 ${blocked} 项,待人工确认 ${pending} 项。请查看日志。" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false }, "parentId": "t01_84", "slot": "statement_if" }, { "id": "t01_86", "componentId": "Log_Info", "label": "输出测试结果", "position": { "x": 220, "y": 4580 }, "values": { "msg": "本组全部通过。" }, "options": { "timeoutMs": 15000, "retryCount": 0, "logException": false }, "parentId": "t01_84", "slot": "statement_else" } ], "edges": [ { "id": "e_t01_2", "source": "t01_1", "target": "t01_2" }, { "id": "e_t01_3", "source": "t01_2", "target": "t01_3" }, { "id": "e_t01_4", "source": "t01_3", "target": "t01_4" }, { "id": "e_t01_5", "source": "t01_4", "target": "t01_5" }, { "id": "e_t01_6", "source": "t01_5", "target": "t01_6" }, { "id": "e_t01_7", "source": "t01_6", "target": "t01_7" }, { "id": "e_t01_15", "source": "t01_7", "target": "t01_15" }, { "id": "e_t01_16", "source": "t01_15", "target": "t01_16" }, { "id": "e_t01_24", "source": "t01_16", "target": "t01_24" }, { "id": "e_t01_25", "source": "t01_24", "target": "t01_25" }, { "id": "e_t01_33", "source": "t01_25", "target": "t01_33" }, { "id": "e_t01_34", "source": "t01_33", "target": "t01_34" }, { "id": "e_t01_42", "source": "t01_34", "target": "t01_42" }, { "id": "e_t01_43", "source": "t01_42", "target": "t01_43" }, { "id": "e_t01_53", "source": "t01_43", "target": "t01_53" }, { "id": "e_t01_54", "source": "t01_53", "target": "t01_54" }, { "id": "e_t01_63", "source": "t01_54", "target": "t01_63" }, { "id": "e_t01_64", "source": "t01_63", "target": "t01_64" }, { "id": "e_t01_72", "source": "t01_64", "target": "t01_72" }, { "id": "e_t01_73", "source": "t01_72", "target": "t01_73" }, { "id": "e_t01_81", "source": "t01_73", "target": "t01_81" }, { "id": "e_t01_82", "source": "t01_81", "target": "t01_82" }, { "id": "e_t01_83", "source": "t01_82", "target": "t01_83" }, { "id": "e_t01_84", "source": "t01_83", "target": "t01_84" } ], "meta": { "createdAt": "2026-10-30T00:00:00.000Z", "updatedAt": "2026-10-30T00:00:00.000Z", "appVersion": "0.1.0" } }