From ea77b16104ca23eaac96cd36e6ef5ae214105b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=95=8F?= Date: Mon, 16 Dec 2024 13:44:38 +0800 Subject: [PATCH] =?UTF-8?q?test(REQ-3282):=20=E6=B7=BB=E5=8A=A0http?= =?UTF-8?q?=E9=9B=86=E6=88=90=E6=B5=8B=E8=AF=95=E8=84=9A=E6=9C=ACdemo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../http/cooperateship/cooperate-ship.http | 14 +++ .../src/test/resources/http/node/node.http | 14 +++ .../resources/http/nodeuser/node-user.http | 14 +++ .../test/resources/http/orgjob/org-job.http | 14 +++ .../test/resources/http/orguser/org-user.http | 14 +++ .../src/test/resources/http/private.http | 88 +++++++++++++++++++ .../src/test/resources/http/reponse-check.js | 7 ++ .../test/resources/http/rest-client.env.json | 14 +++ .../src/test/resources/http/unit/unit.http | 14 +++ 9 files changed, 193 insertions(+) create mode 100644 orgmanax-api/src/test/resources/http/cooperateship/cooperate-ship.http create mode 100644 orgmanax-api/src/test/resources/http/node/node.http create mode 100644 orgmanax-api/src/test/resources/http/nodeuser/node-user.http create mode 100644 orgmanax-api/src/test/resources/http/orgjob/org-job.http create mode 100644 orgmanax-api/src/test/resources/http/orguser/org-user.http create mode 100644 orgmanax-api/src/test/resources/http/private.http create mode 100644 orgmanax-api/src/test/resources/http/reponse-check.js create mode 100644 orgmanax-api/src/test/resources/http/rest-client.env.json create mode 100644 orgmanax-api/src/test/resources/http/unit/unit.http diff --git a/orgmanax-api/src/test/resources/http/cooperateship/cooperate-ship.http b/orgmanax-api/src/test/resources/http/cooperateship/cooperate-ship.http new file mode 100644 index 0000000..b372604 --- /dev/null +++ b/orgmanax-api/src/test/resources/http/cooperateship/cooperate-ship.http @@ -0,0 +1,14 @@ +# 查询协同关系 +POST {{host}}/api/org/cooperate-ship/list +Content-Type: application/json +Accept: application/json + +{ + "workspaceId": 195, + "status": 1, + "organizationalUnitId": 5140, + "cooperateTypes": [ + 9, + 11 + ] +} \ No newline at end of file diff --git a/orgmanax-api/src/test/resources/http/node/node.http b/orgmanax-api/src/test/resources/http/node/node.http new file mode 100644 index 0000000..b372604 --- /dev/null +++ b/orgmanax-api/src/test/resources/http/node/node.http @@ -0,0 +1,14 @@ +# 查询协同关系 +POST {{host}}/api/org/cooperate-ship/list +Content-Type: application/json +Accept: application/json + +{ + "workspaceId": 195, + "status": 1, + "organizationalUnitId": 5140, + "cooperateTypes": [ + 9, + 11 + ] +} \ No newline at end of file diff --git a/orgmanax-api/src/test/resources/http/nodeuser/node-user.http b/orgmanax-api/src/test/resources/http/nodeuser/node-user.http new file mode 100644 index 0000000..b372604 --- /dev/null +++ b/orgmanax-api/src/test/resources/http/nodeuser/node-user.http @@ -0,0 +1,14 @@ +# 查询协同关系 +POST {{host}}/api/org/cooperate-ship/list +Content-Type: application/json +Accept: application/json + +{ + "workspaceId": 195, + "status": 1, + "organizationalUnitId": 5140, + "cooperateTypes": [ + 9, + 11 + ] +} \ No newline at end of file diff --git a/orgmanax-api/src/test/resources/http/orgjob/org-job.http b/orgmanax-api/src/test/resources/http/orgjob/org-job.http new file mode 100644 index 0000000..b372604 --- /dev/null +++ b/orgmanax-api/src/test/resources/http/orgjob/org-job.http @@ -0,0 +1,14 @@ +# 查询协同关系 +POST {{host}}/api/org/cooperate-ship/list +Content-Type: application/json +Accept: application/json + +{ + "workspaceId": 195, + "status": 1, + "organizationalUnitId": 5140, + "cooperateTypes": [ + 9, + 11 + ] +} \ No newline at end of file diff --git a/orgmanax-api/src/test/resources/http/orguser/org-user.http b/orgmanax-api/src/test/resources/http/orguser/org-user.http new file mode 100644 index 0000000..b372604 --- /dev/null +++ b/orgmanax-api/src/test/resources/http/orguser/org-user.http @@ -0,0 +1,14 @@ +# 查询协同关系 +POST {{host}}/api/org/cooperate-ship/list +Content-Type: application/json +Accept: application/json + +{ + "workspaceId": 195, + "status": 1, + "organizationalUnitId": 5140, + "cooperateTypes": [ + 9, + 11 + ] +} \ No newline at end of file diff --git a/orgmanax-api/src/test/resources/http/private.http b/orgmanax-api/src/test/resources/http/private.http new file mode 100644 index 0000000..8d5ff4e --- /dev/null +++ b/orgmanax-api/src/test/resources/http/private.http @@ -0,0 +1,88 @@ +# 查询模板 +POST {{host}}/private/event/produce +Content-Type: application/json +Accept: application/json + +{ + "topic": "workflow-engine-topic", + "event": { + "eventId": "workflowEngine_a782177733e04bdca31c564511e5a85c", + "eventModule": "process-activity", + "eventName": "process-activity-wait-assignee", + "eventTime": 1715224551784, + "operatorId": "system", + "operatorType": "system", + "shardingKey": "202405091115000000001", + "targetId": "202405091115000000001", + "targetType": "process-activity-wait-assignee", + "data": { + "activityId": "node_229273528135", + "activityName": "业务节点", + "businessKey": "J1788407490489188354", + "passedAssigners": [], + "processDefinitionId": "acceptance:2:202405091050000000004", + "processDefinitionKey": "acceptance", + "processInstanceId": "202405091115000000001", + "triggerId": "202405091115000000054", + "type": "PROCESS_ACTIVITY_WAIT_ASSIGNEE", + "variables": { + "[_ACTIVITY_INFO_SNAPSHOT_]NODE_STARTER": [ + { + "ouId": "5144", + "personId": "9000400322", + "tenantId": "0" + } + ], + "[_ACTIVITY_INFO_SNAPSHOT_]node_229273528135": [ + { + "assignee": "biz", + "assigneeType": "_skip_", + "assignerName": "dummyApprover", + "ouId": "", + "personId": "", + "tenantId": "" + } + ], + "[_ASSIGNEE_INFO_]202405091115000000027": "{\"ouId\":\"5144\",\"personId\":\"9000400322\",\"tenantId\":\"0\"}", + "[_ASSIGNEE_INFO_]202405091115000000058": "{\"assignee\":\"biz\",\"assigneeType\":\"_skip_\",\"assignerName\":\"dummyApprover\",\"ouId\":\"\",\"personId\":\"\",\"tenantId\":\"\"}", + "[_ASSIGNEE_LIST_INFO_]node_229273528135": [ + "|" + ], + "[_BIZ_ORG_RELATION_]": { + "orgScopes": [], + "workerTeamScopes": [] + }, + "[_INTERNAL_INITIATOR_]": "{\"ouId\":\"5144\",\"personId\":\"9000400322\",\"tenantId\":\"0\"}", + "[_INTERNAL_PROCESS_AGENT]": false, + "[_INTERNAL_PROCESS_WORKSPACE_TYPE]": 2, + "[_PENDING_VARIABLES]": {}, + "[_WORKFLOW_ENGINE_VERSION_]": "1.3.3-SNAPSHOT", + "_TASK_COMPLETE_TYPE202405091115000000027": "APPROVED", + "groupExists": "false", + "laborSubcontractingExists": "true", + "primaryContractingExists": "true", + "professionalSubcontractingExists": "true", + "teamExists": "true" + }, + "workflowEngineVersion": "1.3.3-SNAPSHOT" + } + } +} + +### 查询变量 +POST {{host}}/private/properties +Content-Type: application/json +Accept: application/json + +{ + +} + +### 查询变量 +POST {{host}}/private/exception +Content-Type: application/json +Accept: application/json + +{ + +} \ No newline at end of file diff --git a/orgmanax-api/src/test/resources/http/reponse-check.js b/orgmanax-api/src/test/resources/http/reponse-check.js new file mode 100644 index 0000000..65d2b56 --- /dev/null +++ b/orgmanax-api/src/test/resources/http/reponse-check.js @@ -0,0 +1,7 @@ +client.test("request executed successful", function() { + client.assert(response.code == 200, "Response status is not 200") +}); + +client.test("response body status successful", function () { + client.assert(response.body.status == "SUCCESS", "Response body status is not success") +}); \ No newline at end of file diff --git a/orgmanax-api/src/test/resources/http/rest-client.env.json b/orgmanax-api/src/test/resources/http/rest-client.env.json new file mode 100644 index 0000000..9558e13 --- /dev/null +++ b/orgmanax-api/src/test/resources/http/rest-client.env.json @@ -0,0 +1,14 @@ +{ + "local": { + "host": "http://localhost:8080" + }, + "dev": { + "host": "http://dev-app.axzo.cn/orgmanax" + }, + "test": { + "host": "http://test-api.axzo.cn/orgmanax" + }, + "pre": { + "host": "http://pre-api.axzo.cn/orgmanax" + } +} \ No newline at end of file diff --git a/orgmanax-api/src/test/resources/http/unit/unit.http b/orgmanax-api/src/test/resources/http/unit/unit.http new file mode 100644 index 0000000..b372604 --- /dev/null +++ b/orgmanax-api/src/test/resources/http/unit/unit.http @@ -0,0 +1,14 @@ +# 查询协同关系 +POST {{host}}/api/org/cooperate-ship/list +Content-Type: application/json +Accept: application/json + +{ + "workspaceId": 195, + "status": 1, + "organizationalUnitId": 5140, + "cooperateTypes": [ + 9, + 11 + ] +} \ No newline at end of file