{
  "result": {
    "stats": {
      "steps": {
        "total": 1,
        "passed": 0,
        "failed": 1
      },
      "iterations": {
        "total": 1,
        "pending": 0,
        "failed": 1
      },
      "items": {},
      "scripts": {
        "total": 3,
        "pending": 0,
        "failed": 0
      },
      "prerequests": {
        "total": 1,
        "pending": 0,
        "failed": 0
      },
      "requests": {
        "total": 1,
        "pending": 0,
        "failed": 1
      },
      "socketRequests": {
        "total": 0,
        "pending": 0,
        "failed": 0
      },
      "tests": {
        "total": 1,
        "pending": 0,
        "failed": 0
      },
      "assertions": {
        "total": 2,
        "pending": 0,
        "failed": 2
      },
      "testScripts": {
        "total": 2,
        "pending": 0,
        "failed": 0
      },
      "prerequestScripts": {
        "total": 1,
        "pending": 0,
        "failed": 0
      }
    },
    "timings": {
      "responseTime": 3092,
      "responseAverage": 3092,
      "responseMin": 3092,
      "responseMax": 3092,
      "responseSd": 0,
      "dnsAverage": 0,
      "dnsMin": 0,
      "dnsMax": 0,
      "dnsSd": 0,
      "firstByteAverage": 0,
      "firstByteMin": 0,
      "firstByteMax": 0,
      "firstByteSd": 0,
      "started": 1788341017544,
      "completed": 1788341020679
    },
    "transfers": {
      "responseTotal": 0
    },
    "failures": [
      {
        "error": {
          "name": "AssertionError",
          "index": 0,
          "test": "验证返回401未授权状态码",
          "message": "expected '502' to deeply equal '401'",
          "expected": "401",
          "actual": "502",
          "stack": "AssertionError: expected '502' to deeply equal '401'\n   at Object.eval sandbox-script.js:1:1)",
          "isNotPlainError": true
        },
        "at": "assertion:0 in test-script",
        "cursor": {
          "position": 0,
          "iteration": 0,
          "length": 1,
          "cycles": 1,
          "empty": false,
          "eof": false,
          "bof": true,
          "cr": false,
          "ref": "c35209e4-8f01-4286-a7ba-0441141f2396",
          "requestIndex": 0,
          "httpRequestId": "69dc7967-4834-4903-a6cb-9405e6513c19",
          "scriptId": "postProcessors.0.assertion",
          "execution": "2142a6fd-49ca-4c7f-aaf7-7c6c8155adf5"
        }
      },
      {
        "error": {
          "name": "AssertionError",
          "index": 0,
          "test": "验证响应包含未授权提示信息",
          "message": "the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string",
          "expected": null,
          "actual": null,
          "stack": "AssertionError: the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string\n   at Object.eval sandbox-script.js:1:1)",
          "isNotPlainError": true
        },
        "at": "assertion:0 in test-script",
        "cursor": {
          "position": 0,
          "iteration": 0,
          "length": 1,
          "cycles": 1,
          "empty": false,
          "eof": false,
          "bof": true,
          "cr": false,
          "ref": "c35209e4-8f01-4286-a7ba-0441141f2396",
          "requestIndex": 0,
          "httpRequestId": "69dc7967-4834-4903-a6cb-9405e6513c19",
          "scriptId": "postProcessors.1.assertion",
          "execution": "518700b1-a68e-47d0-bcfe-2aef2aa4a8ae"
        }
      }
    ],
    "stepTree": [
      {
        "ref": "c35209e4-8f01-4286-a7ba-0441141f2396",
        "type": "http"
      }
    ],
    "error": null
  },
  "isTestFlowControl": true,
  "run": {
    "stats": {
      "steps": {
        "total": 1,
        "passed": 0,
        "failed": 1
      },
      "iterations": {
        "total": 1,
        "pending": 0,
        "failed": 1
      },
      "items": {},
      "scripts": {
        "total": 3,
        "pending": 0,
        "failed": 0
      },
      "prerequests": {
        "total": 1,
        "pending": 0,
        "failed": 0
      },
      "requests": {
        "total": 1,
        "pending": 0,
        "failed": 1
      },
      "socketRequests": {
        "total": 0,
        "pending": 0,
        "failed": 0
      },
      "tests": {
        "total": 1,
        "pending": 0,
        "failed": 0
      },
      "assertions": {
        "total": 2,
        "pending": 0,
        "failed": 2
      },
      "testScripts": {
        "total": 2,
        "pending": 0,
        "failed": 0
      },
      "prerequestScripts": {
        "total": 1,
        "pending": 0,
        "failed": 0
      }
    },
    "timings": {
      "responseTime": 3092,
      "responseAverage": 3092,
      "responseMin": 3092,
      "responseMax": 3092,
      "responseSd": 0,
      "dnsAverage": 0,
      "dnsMin": 0,
      "dnsMax": 0,
      "dnsSd": 0,
      "firstByteAverage": 0,
      "firstByteMin": 0,
      "firstByteMax": 0,
      "firstByteSd": 0,
      "started": 1788341017544,
      "completed": 1788341020679
    },
    "transfers": {
      "responseTotal": 0
    },
    "failures": [
      {
        "error": {
          "name": "AssertionError",
          "index": 0,
          "test": "验证返回401未授权状态码",
          "message": "expected '502' to deeply equal '401'",
          "expected": "401",
          "actual": "502",
          "stack": "AssertionError: expected '502' to deeply equal '401'\n   at Object.eval sandbox-script.js:1:1)",
          "isNotPlainError": true
        },
        "at": "assertion:0 in test-script",
        "source": {
          "id": "553e7e1a-34df-4d48-98ba-a1e61094d537",
          "name": "发卡人员(缺失Access-Token请求头 - 负向未授权访问 - 期望返回401未授权)",
          "request": {
            "url": {
              "protocol": "http",
              "port": "4523",
              "path": [
                "mock",
                "5737553",
                "api",
                "card",
                "issueStaff"
              ],
              "host": [
                "127",
                "0",
                "0",
                "1"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "User-Agent",
                "value": "app/1.0.0"
              }
            ],
            "method": "POST",
            "baseUrl": "http://127.0.0.1:4523/mock/5737553",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "disabled": false,
                  "key": "name",
                  "value": "王",
                  "type": "string"
                },
                {
                  "disabled": false,
                  "key": "deptIds",
                  "value": "58170241-F955-D161-E1B1-8988261ED595,A572DE95-9513-2840-48F8-F8003E88C1E8",
                  "type": "string"
                }
              ]
            },
            "auth": {
              "type": "noauth",
              "noauth": []
            }
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "id": "commonScript.assertion",
                "type": "text/javascript",
                "exec": [
                  "",
                  "  ____string2Array = function(value) {",
                  "    if(typeof value === 'object'){",
                  "      return value;",
                  "    }",
                  "    try {",
                  "      return JSON.parse(value);",
                  "    } catch (e) {",
                  "      return value;",
                  "    }",
                  "  }",
                  "  ____string2Number = function(value, errorMsg) {",
                  "   if(typeof value !== 'string'){",
                  "     return value;",
                  "   }",
                  "   if (/^\\-?\\d+$/.test(value)) {",
                  "       return parseInt(value);",
                  "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                  "       return parseFloat(value);",
                  "   } else {",
                  "       throw new Error(errorMsg || 'Data type mismatch')",
                  "   }",
                  " }",
                  "",
                  "  ____formatValues = function(value, stringCompareValue, comparison) {",
                  "   try{",
                  "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                  "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                  "     let compareValue;",
                  "     switch (typeof value) {",
                  "         case 'string':",
                  "             if (isNumberComparisons) {",
                  "                value = ____string2Number(value);",
                  "                compareValue = ____string2Number(stringCompareValue);",
                  "             } else if (isCollectionComparisons) {",
                  "                compareValue = ____string2Array(stringCompareValue);",
                  "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                  "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                  "             } else {",
                  "                compareValue = stringCompareValue;",
                  "             }",
                  "             break;",
                  "         case 'object':",
                  "             const isArray = value instanceof Array;",
                  "             if (isNumberComparisons) {",
                  "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                  "             } else if (isCollectionComparisons && isArray) {",
                  "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                  "            } else if (",
                  "              isArray &&",
                  "              comparison === 'include' &&",
                  "              value.includes(stringCompareValue)",
                  "            ) {",
                  "              compareValue = stringCompareValue;",
                  "            } else {",
                  "              try {",
                  "                  compareValue = JSON.parse(stringCompareValue);",
                  "              } catch (e) {",
                  "                  compareValue = stringCompareValue;",
                  "              }",
                  "            }",
                  "             break;",
                  "         case 'boolean':",
                  "             if (isNumberComparisons || isCollectionComparisons) {",
                  "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                  "             }",
                  "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                  "             break;",
                  "           case 'bigint':",
                  "           case 'number':",
                  "             if (isNumberComparisons) {",
                  "               compareValue = ____string2Number(stringCompareValue);",
                  "             } else if (isCollectionComparisons) {",
                  "              compareValue = ____string2Array(stringCompareValue);",
                  "              value = '' + value;",
                  "            } else {",
                  "               compareValue = stringCompareValue;",
                  "               value = '' + value;",
                  "             }",
                  "             break;",
                  "         case 'null':",
                  "             if (isNumberComparisons) {",
                  "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                  "             }",
                  "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                  "             break;",
                  "         default:",
                  "            if (isCollectionComparisons) {",
                  "              compareValue = ____string2Array(stringCompareValue);",
                  "            } else {",
                  "              compareValue = stringCompareValue;",
                  "            }",
                  "            break;",
                  "     }",
                  "     return { compareValue, value };",
                  "   } catch(e) {",
                  "     console.log(e);",
                  "     throw e;",
                  "   }",
                  " }",
                  " "
                ],
                "_lastExecutionId": "073ea37c-4be3-42f4-8802-79dff4b65bac"
              }
            },
            {
              "listen": "test",
              "script": {
                "id": "postProcessors.0.assertion",
                "type": "text/javascript",
                "exec": [
                  "",
                  "        if (JSON.setEnableBigInt) {",
                  "          JSON.setEnableBigInt(undefined);",
                  "        }",
                  "        ",
                  "  async function ____replaceIn(value) {",
                  "    if (typeof pm.variables.replaceInAsync === 'function') {",
                  "      return await pm.variables.replaceInAsync(value);",
                  "    }",
                  "    return pm.variables.replaceIn(value);",
                  "  };",
                  "",
                  "  ;(async () => {",
                  "    try {",
                  "      const formattedName = await ____replaceIn(`验证返回401未授权状态码`);",
                  "      pm.test(formattedName, async function(done) {",
                  "        try {",
                  "          ",
                  "          const expression = await ____replaceIn(\"\");",
                  "          const value = pm.response.code",
                  "      ",
                  "          ",
                  "    const compareValue = await ____replaceIn(`401`);",
                  "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                  "  ",
                  "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                  "          done();",
                  "        } catch (err) {",
                  "          done(err);",
                  "        }",
                  "      });",
                  "    } catch(e) {",
                  "      setImmediate(() => { throw e });",
                  "    }",
                  "  })();",
                  "      "
                ],
                "_lastExecutionId": "2142a6fd-49ca-4c7f-aaf7-7c6c8155adf5"
              }
            },
            {
              "listen": "test",
              "script": {
                "id": "postProcessors.1.assertion",
                "type": "text/javascript",
                "exec": [
                  "",
                  "        if (JSON.setEnableBigInt) {",
                  "          JSON.setEnableBigInt(undefined);",
                  "        }",
                  "        ",
                  "  async function ____replaceIn(value) {",
                  "    if (typeof pm.variables.replaceInAsync === 'function') {",
                  "      return await pm.variables.replaceInAsync(value);",
                  "    }",
                  "    return pm.variables.replaceIn(value);",
                  "  };",
                  "",
                  "  ;(async () => {",
                  "    try {",
                  "      const formattedName = await ____replaceIn(`验证响应包含未授权提示信息`);",
                  "      pm.test(formattedName, async function(done) {",
                  "        try {",
                  "          ",
                  "          const expression = await ____replaceIn(`$.message`);",
                  "          const JSONPath = require('jsonpath-plus').JSONPath;",
                  "          let jsonData;",
                  "          try {",
                  "            jsonData = pm.response.json();",
                  "          } catch(e) {",
                  "            let text = pm.response.text();",
                  "            const xml2js = require('xml2js');",
                  "            function removeXmlUselessPrefixAndSuffix(text) {",
                  "              const start = text.indexOf('<');",
                  "              const end = text.lastIndexOf('>');",
                  "              if (start === -1 || end === -1) {",
                  "                return text;",
                  "              }",
                  "              return text.substring(start, end + 1);",
                  "            }",
                  "            text = removeXmlUselessPrefixAndSuffix(text);",
                  "            let json;",
                  "            let xmlParseOptions = {",
                  "                explicitArray: false,",
                  "                trim: true,",
                  "                ignoreAttrs: true,",
                  "            };",
                  "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                  "                jsonData = result;",
                  "            });",
                  "          }",
                  "          let value = JSONPath({",
                  "            json: jsonData,",
                  "            path: expression,",
                  "            wrap: false",
                  "          });",
                  "",
                  "          if (false && undefined !== undefined) {",
                  "            if (Array.isArray(value)) {",
                  "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                  "            } else {",
                  "              value = undefined;",
                  "            }",
                  "          }",
                  "",
                  "          ",
                  "          ",
                  "    const compareValue = await ____replaceIn(`未授权`);",
                  "    const formattedValues = ____formatValues(value, compareValue, 'include');",
                  "  ",
                  "          pm.expect(formattedValues.value).to.include(formattedValues.compareValue);",
                  "          done();",
                  "        } catch (err) {",
                  "          done(err);",
                  "        }",
                  "      });",
                  "    } catch(e) {",
                  "      setImmediate(() => { throw e });",
                  "    }",
                  "  })();",
                  "      "
                ],
                "_lastExecutionId": "518700b1-a68e-47d0-bcfe-2aef2aa4a8ae"
              }
            }
          ],
          "protocolProfileBehavior": {
            "useWhatWGUrlParser": false,
            "disableUrlEncoding": false,
            "disabledSystemHeaders": {},
            "disableCookies": false
          },
          "type": "http",
          "responseDefinition": {
            "validateDeletedResponse": false
          },
          "requestDefinition": {
            "jsonSchema": {},
            "examples": []
          },
          "overrideRequesterOptions": {
            "strictSSL": false
          },
          "metaInfo": {
            "blockId": "92e6127b-1960-4d0f-9c6c-160b356162a1",
            "id": "92e6127b-1960-4d0f-9c6c-160b356162a1",
            "type": "http",
            "projectId": 5737553,
            "relatedId": 372906771,
            "environmentId": 28635397,
            "blockNumber": 1,
            "tags": [],
            "httpApiId": 372906771,
            "httpApiCaseId": 317386461,
            "httpApiName": "发卡人员",
            "httpApiPath": "/api/card/issueStaff",
            "httpApiMethod": "post",
            "httpApiCaseName": "缺失Access-Token请求头 - 负向未授权访问 - 期望返回401未授权",
            "moduleId": 4788005,
            "serverId": "default"
          },
          "scope": {
            "blockId": "92e6127b-1960-4d0f-9c6c-160b356162a1",
            "id": "92e6127b-1960-4d0f-9c6c-160b356162a1",
            "type": "http",
            "projectId": 5737553,
            "relatedId": 372906771,
            "environmentId": 28635397,
            "blockNumber": 1,
            "tags": [],
            "httpApiId": 372906771,
            "httpApiCaseId": 317386461,
            "httpApiName": "发卡人员",
            "httpApiPath": "/api/card/issueStaff",
            "httpApiMethod": "post",
            "httpApiCaseName": "缺失Access-Token请求头 - 负向未授权访问 - 期望返回401未授权",
            "moduleId": 4788005,
            "serverId": "default"
          },
          "resolveResponsePassed": {},
          "responseValidation": {}
        },
        "cursor": {
          "position": 0,
          "iteration": 0,
          "length": 1,
          "cycles": 1,
          "empty": false,
          "eof": false,
          "bof": true,
          "cr": false,
          "ref": "c35209e4-8f01-4286-a7ba-0441141f2396",
          "requestIndex": 0,
          "httpRequestId": "69dc7967-4834-4903-a6cb-9405e6513c19",
          "scriptId": "postProcessors.0.assertion",
          "execution": "2142a6fd-49ca-4c7f-aaf7-7c6c8155adf5"
        }
      },
      {
        "error": {
          "name": "AssertionError",
          "index": 0,
          "test": "验证响应包含未授权提示信息",
          "message": "the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string",
          "expected": null,
          "actual": null,
          "stack": "AssertionError: the given combination of arguments (undefined and string) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a string\n   at Object.eval sandbox-script.js:1:1)",
          "isNotPlainError": true
        },
        "at": "assertion:0 in test-script",
        "source": {
          "id": "553e7e1a-34df-4d48-98ba-a1e61094d537",
          "name": "发卡人员(缺失Access-Token请求头 - 负向未授权访问 - 期望返回401未授权)",
          "request": {
            "url": {
              "protocol": "http",
              "port": "4523",
              "path": [
                "mock",
                "5737553",
                "api",
                "card",
                "issueStaff"
              ],
              "host": [
                "127",
                "0",
                "0",
                "1"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "User-Agent",
                "value": "app/1.0.0"
              }
            ],
            "method": "POST",
            "baseUrl": "http://127.0.0.1:4523/mock/5737553",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "disabled": false,
                  "key": "name",
                  "value": "王",
                  "type": "string"
                },
                {
                  "disabled": false,
                  "key": "deptIds",
                  "value": "58170241-F955-D161-E1B1-8988261ED595,A572DE95-9513-2840-48F8-F8003E88C1E8",
                  "type": "string"
                }
              ]
            },
            "auth": {
              "type": "noauth",
              "noauth": []
            }
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "id": "commonScript.assertion",
                "type": "text/javascript",
                "exec": [
                  "",
                  "  ____string2Array = function(value) {",
                  "    if(typeof value === 'object'){",
                  "      return value;",
                  "    }",
                  "    try {",
                  "      return JSON.parse(value);",
                  "    } catch (e) {",
                  "      return value;",
                  "    }",
                  "  }",
                  "  ____string2Number = function(value, errorMsg) {",
                  "   if(typeof value !== 'string'){",
                  "     return value;",
                  "   }",
                  "   if (/^\\-?\\d+$/.test(value)) {",
                  "       return parseInt(value);",
                  "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                  "       return parseFloat(value);",
                  "   } else {",
                  "       throw new Error(errorMsg || 'Data type mismatch')",
                  "   }",
                  " }",
                  "",
                  "  ____formatValues = function(value, stringCompareValue, comparison) {",
                  "   try{",
                  "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                  "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                  "     let compareValue;",
                  "     switch (typeof value) {",
                  "         case 'string':",
                  "             if (isNumberComparisons) {",
                  "                value = ____string2Number(value);",
                  "                compareValue = ____string2Number(stringCompareValue);",
                  "             } else if (isCollectionComparisons) {",
                  "                compareValue = ____string2Array(stringCompareValue);",
                  "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                  "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                  "             } else {",
                  "                compareValue = stringCompareValue;",
                  "             }",
                  "             break;",
                  "         case 'object':",
                  "             const isArray = value instanceof Array;",
                  "             if (isNumberComparisons) {",
                  "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                  "             } else if (isCollectionComparisons && isArray) {",
                  "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                  "            } else if (",
                  "              isArray &&",
                  "              comparison === 'include' &&",
                  "              value.includes(stringCompareValue)",
                  "            ) {",
                  "              compareValue = stringCompareValue;",
                  "            } else {",
                  "              try {",
                  "                  compareValue = JSON.parse(stringCompareValue);",
                  "              } catch (e) {",
                  "                  compareValue = stringCompareValue;",
                  "              }",
                  "            }",
                  "             break;",
                  "         case 'boolean':",
                  "             if (isNumberComparisons || isCollectionComparisons) {",
                  "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                  "             }",
                  "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                  "             break;",
                  "           case 'bigint':",
                  "           case 'number':",
                  "             if (isNumberComparisons) {",
                  "               compareValue = ____string2Number(stringCompareValue);",
                  "             } else if (isCollectionComparisons) {",
                  "              compareValue = ____string2Array(stringCompareValue);",
                  "              value = '' + value;",
                  "            } else {",
                  "               compareValue = stringCompareValue;",
                  "               value = '' + value;",
                  "             }",
                  "             break;",
                  "         case 'null':",
                  "             if (isNumberComparisons) {",
                  "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                  "             }",
                  "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                  "             break;",
                  "         default:",
                  "            if (isCollectionComparisons) {",
                  "              compareValue = ____string2Array(stringCompareValue);",
                  "            } else {",
                  "              compareValue = stringCompareValue;",
                  "            }",
                  "            break;",
                  "     }",
                  "     return { compareValue, value };",
                  "   } catch(e) {",
                  "     console.log(e);",
                  "     throw e;",
                  "   }",
                  " }",
                  " "
                ],
                "_lastExecutionId": "073ea37c-4be3-42f4-8802-79dff4b65bac"
              }
            },
            {
              "listen": "test",
              "script": {
                "id": "postProcessors.0.assertion",
                "type": "text/javascript",
                "exec": [
                  "",
                  "        if (JSON.setEnableBigInt) {",
                  "          JSON.setEnableBigInt(undefined);",
                  "        }",
                  "        ",
                  "  async function ____replaceIn(value) {",
                  "    if (typeof pm.variables.replaceInAsync === 'function') {",
                  "      return await pm.variables.replaceInAsync(value);",
                  "    }",
                  "    return pm.variables.replaceIn(value);",
                  "  };",
                  "",
                  "  ;(async () => {",
                  "    try {",
                  "      const formattedName = await ____replaceIn(`验证返回401未授权状态码`);",
                  "      pm.test(formattedName, async function(done) {",
                  "        try {",
                  "          ",
                  "          const expression = await ____replaceIn(\"\");",
                  "          const value = pm.response.code",
                  "      ",
                  "          ",
                  "    const compareValue = await ____replaceIn(`401`);",
                  "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                  "  ",
                  "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                  "          done();",
                  "        } catch (err) {",
                  "          done(err);",
                  "        }",
                  "      });",
                  "    } catch(e) {",
                  "      setImmediate(() => { throw e });",
                  "    }",
                  "  })();",
                  "      "
                ],
                "_lastExecutionId": "2142a6fd-49ca-4c7f-aaf7-7c6c8155adf5"
              }
            },
            {
              "listen": "test",
              "script": {
                "id": "postProcessors.1.assertion",
                "type": "text/javascript",
                "exec": [
                  "",
                  "        if (JSON.setEnableBigInt) {",
                  "          JSON.setEnableBigInt(undefined);",
                  "        }",
                  "        ",
                  "  async function ____replaceIn(value) {",
                  "    if (typeof pm.variables.replaceInAsync === 'function') {",
                  "      return await pm.variables.replaceInAsync(value);",
                  "    }",
                  "    return pm.variables.replaceIn(value);",
                  "  };",
                  "",
                  "  ;(async () => {",
                  "    try {",
                  "      const formattedName = await ____replaceIn(`验证响应包含未授权提示信息`);",
                  "      pm.test(formattedName, async function(done) {",
                  "        try {",
                  "          ",
                  "          const expression = await ____replaceIn(`$.message`);",
                  "          const JSONPath = require('jsonpath-plus').JSONPath;",
                  "          let jsonData;",
                  "          try {",
                  "            jsonData = pm.response.json();",
                  "          } catch(e) {",
                  "            let text = pm.response.text();",
                  "            const xml2js = require('xml2js');",
                  "            function removeXmlUselessPrefixAndSuffix(text) {",
                  "              const start = text.indexOf('<');",
                  "              const end = text.lastIndexOf('>');",
                  "              if (start === -1 || end === -1) {",
                  "                return text;",
                  "              }",
                  "              return text.substring(start, end + 1);",
                  "            }",
                  "            text = removeXmlUselessPrefixAndSuffix(text);",
                  "            let json;",
                  "            let xmlParseOptions = {",
                  "                explicitArray: false,",
                  "                trim: true,",
                  "                ignoreAttrs: true,",
                  "            };",
                  "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                  "                jsonData = result;",
                  "            });",
                  "          }",
                  "          let value = JSONPath({",
                  "            json: jsonData,",
                  "            path: expression,",
                  "            wrap: false",
                  "          });",
                  "",
                  "          if (false && undefined !== undefined) {",
                  "            if (Array.isArray(value)) {",
                  "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                  "            } else {",
                  "              value = undefined;",
                  "            }",
                  "          }",
                  "",
                  "          ",
                  "          ",
                  "    const compareValue = await ____replaceIn(`未授权`);",
                  "    const formattedValues = ____formatValues(value, compareValue, 'include');",
                  "  ",
                  "          pm.expect(formattedValues.value).to.include(formattedValues.compareValue);",
                  "          done();",
                  "        } catch (err) {",
                  "          done(err);",
                  "        }",
                  "      });",
                  "    } catch(e) {",
                  "      setImmediate(() => { throw e });",
                  "    }",
                  "  })();",
                  "      "
                ],
                "_lastExecutionId": "518700b1-a68e-47d0-bcfe-2aef2aa4a8ae"
              }
            }
          ],
          "protocolProfileBehavior": {
            "useWhatWGUrlParser": false,
            "disableUrlEncoding": false,
            "disabledSystemHeaders": {},
            "disableCookies": false
          },
          "type": "http",
          "responseDefinition": {
            "validateDeletedResponse": false
          },
          "requestDefinition": {
            "jsonSchema": {},
            "examples": []
          },
          "overrideRequesterOptions": {
            "strictSSL": false
          },
          "metaInfo": {
            "blockId": "92e6127b-1960-4d0f-9c6c-160b356162a1",
            "id": "92e6127b-1960-4d0f-9c6c-160b356162a1",
            "type": "http",
            "projectId": 5737553,
            "relatedId": 372906771,
            "environmentId": 28635397,
            "blockNumber": 1,
            "tags": [],
            "httpApiId": 372906771,
            "httpApiCaseId": 317386461,
            "httpApiName": "发卡人员",
            "httpApiPath": "/api/card/issueStaff",
            "httpApiMethod": "post",
            "httpApiCaseName": "缺失Access-Token请求头 - 负向未授权访问 - 期望返回401未授权",
            "moduleId": 4788005,
            "serverId": "default"
          },
          "scope": {
            "blockId": "92e6127b-1960-4d0f-9c6c-160b356162a1",
            "id": "92e6127b-1960-4d0f-9c6c-160b356162a1",
            "type": "http",
            "projectId": 5737553,
            "relatedId": 372906771,
            "environmentId": 28635397,
            "blockNumber": 1,
            "tags": [],
            "httpApiId": 372906771,
            "httpApiCaseId": 317386461,
            "httpApiName": "发卡人员",
            "httpApiPath": "/api/card/issueStaff",
            "httpApiMethod": "post",
            "httpApiCaseName": "缺失Access-Token请求头 - 负向未授权访问 - 期望返回401未授权",
            "moduleId": 4788005,
            "serverId": "default"
          },
          "resolveResponsePassed": {},
          "responseValidation": {}
        },
        "cursor": {
          "position": 0,
          "iteration": 0,
          "length": 1,
          "cycles": 1,
          "empty": false,
          "eof": false,
          "bof": true,
          "cr": false,
          "ref": "c35209e4-8f01-4286-a7ba-0441141f2396",
          "requestIndex": 0,
          "httpRequestId": "69dc7967-4834-4903-a6cb-9405e6513c19",
          "scriptId": "postProcessors.1.assertion",
          "execution": "518700b1-a68e-47d0-bcfe-2aef2aa4a8ae"
        }
      }
    ],
    "stepTree": [
      {
        "ref": "c35209e4-8f01-4286-a7ba-0441141f2396",
        "type": "http"
      }
    ],
    "error": null
  },
  "options": {
    "accessToken": "afxp_b1d5f2P6pF4rgO0gfdfOM5ACs4HJwauEi57o",
    "apiBaseUrl": "https://api.apifox.com",
    "project": 5737553,
    "testCase": [
      317386461
    ],
    "environment": 28635397,
    "reporters": [
      "cli",
      "json",
      "html",
      "junit"
    ],
    "outDir": "work/2026-09-02-yunxiao-apifox-appstack-ai-devops-loop/apifox/reports",
    "outFile": "apifox-mock-unauthorized-smoke",
    "originalOutFile": "apifox-mock-unauthorized-smoke",
    "onError": "continue",
    "envVar": [],
    "globalVar": [],
    "color": "off",
    "delayRequest": 0,
    "timeoutRequest": 15000,
    "timeoutScript": 0,
    "enableBigInt": false,
    "disableRejectUnauthorized": false,
    "allowSecuritySensitiveActions": true,
    "reporterOptions": {
      "name": "测试用例",
      "runnerId": "6a258276-0ce8-417c-96ab-b089be850d26",
      "testCaseGroupId": 5737553,
      "executionCount": 1
    },
    "isUploadReportSummary": false,
    "apifoxVersion": "2.2.6",
    "globals": {},
    "teamGlobals": {}
  },
  "collection": {
    "apifoxCli": "1.2.21",
    "item": [
      {
        "item": [
          {
            "id": "553e7e1a-34df-4d48-98ba-a1e61094d537",
            "name": "发卡人员(缺失Access-Token请求头 - 负向未授权访问 - 期望返回401未授权)",
            "request": {
              "url": {
                "protocol": "http",
                "port": "4523",
                "path": [
                  "mock",
                  "5737553",
                  "api",
                  "card",
                  "issueStaff"
                ],
                "host": [
                  "127",
                  "0",
                  "0",
                  "1"
                ],
                "query": [],
                "variable": []
              },
              "header": [
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "POST",
              "baseUrl": "http://127.0.0.1:4523/mock/5737553",
              "body": {
                "mode": "formdata",
                "formdata": [
                  {
                    "disabled": false,
                    "key": "name",
                    "value": "王",
                    "type": "string"
                  },
                  {
                    "disabled": false,
                    "key": "deptIds",
                    "value": "58170241-F955-D161-E1B1-8988261ED595,A572DE95-9513-2840-48F8-F8003E88C1E8",
                    "type": "string"
                  }
                ]
              },
              "auth": {
                "type": "noauth",
                "noauth": []
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`验证返回401未授权状态码`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(\"\");",
                    "          const value = pm.response.code",
                    "      ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`401`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`验证响应包含未授权提示信息`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.message`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`未授权`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'include');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.include(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "92e6127b-1960-4d0f-9c6c-160b356162a1",
              "id": "92e6127b-1960-4d0f-9c6c-160b356162a1",
              "type": "http",
              "projectId": 5737553,
              "relatedId": 372906771,
              "environmentId": 28635397,
              "blockNumber": 1,
              "tags": [],
              "httpApiId": 372906771,
              "httpApiCaseId": 317386461,
              "httpApiName": "发卡人员",
              "httpApiPath": "/api/card/issueStaff",
              "httpApiMethod": "post",
              "httpApiCaseName": "缺失Access-Token请求头 - 负向未授权访问 - 期望返回401未授权",
              "moduleId": 4788005,
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          }
        ],
        "name": "发卡人员"
      }
    ],
    "info": {
      "name": "发卡人员"
    },
    "dataSchemas": {},
    "mockRules": {
      "rules": [],
      "enableSystemRule": true
    },
    "environment": {
      "id": 28635397,
      "name": "本地 Mock",
      "type": "mock",
      "baseUrls": {
        "default": "http://127.0.0.1:4523/mock/5737553"
      },
      "websocketBaseUrls": {},
      "socketioBaseUrls": {},
      "baseUrl": "http://127.0.0.1:4523/mock/5737553",
      "variable": {
        "id": "8856f526-7949-4f32-b7d3-783861aefba9",
        "name": "本地 Mock",
        "baseUrl": "http://127.0.0.1:4523/mock/5737553",
        "baseUrls": {
          "default": "http://127.0.0.1:4523/mock/5737553"
        },
        "values": []
      },
      "parameter": {
        "header": [],
        "query": [],
        "body": [],
        "cookie": []
      },
      "advancedSettings": {}
    },
    "globals": {
      "baseUrls": {},
      "websocketBaseUrls": {},
      "socketioBaseUrls": {},
      "baseUrl": "",
      "variable": {
        "id": "188f74ee-a481-4ad6-abeb-90fe4b9be743",
        "baseUrl": "",
        "baseUrls": {},
        "values": [
          {
            "type": "any",
            "value": "",
            "key": "uuid",
            "isBindInitial": true,
            "initialValue": ""
          },
          {
            "type": "any",
            "value": "",
            "key": "提取菜品uuid",
            "isBindInitial": true,
            "initialValue": ""
          },
          {
            "type": "any",
            "value": "",
            "key": "提取菜品名称",
            "isBindInitial": true,
            "initialValue": ""
          },
          {
            "type": "any",
            "value": "",
            "key": "to",
            "isBindInitial": true,
            "initialValue": ""
          },
          {
            "type": "any",
            "value": "",
            "key": "shijian",
            "isBindInitial": true,
            "initialValue": ""
          },
          {
            "type": "any",
            "value": "",
            "key": "dateFromTempVariable",
            "isBindInitial": true,
            "initialValue": ""
          },
          {
            "type": "any",
            "value": "",
            "key": "cee",
            "isBindInitial": true,
            "initialValue": ""
          },
          {
            "type": "any",
            "value": "",
            "key": "sh",
            "isBindInitial": true,
            "initialValue": ""
          },
          {
            "type": "any",
            "value": "admin",
            "key": "account-dev",
            "isBindInitial": true,
            "initialValue": "admin"
          },
          {
            "type": "any",
            "value": "Admin@2025#User&88",
            "key": "pwd-dev",
            "isBindInitial": true,
            "initialValue": "Admin@2025#User&88"
          },
          {
            "type": "any",
            "value": "K8P3Z2X7Q9W1E4R6T5Y3U8D2F1G7H9",
            "key": "key-dev",
            "isBindInitial": true,
            "initialValue": "K8P3Z2X7Q9W1E4R6T5Y3U8D2F1G7H9"
          }
        ]
      },
      "parameter": {
        "header": [],
        "query": [],
        "body": [],
        "cookie": []
      }
    },
    "teamGlobals": {
      "baseUrls": {},
      "websocketBaseUrls": {},
      "socketioBaseUrls": {},
      "baseUrl": "",
      "variable": {
        "id": "6a0dd6c6-3618-4e50-9e00-cdce613f555b",
        "baseUrl": "",
        "baseUrls": {},
        "values": []
      },
      "parameter": {
        "header": [],
        "query": [],
        "body": [],
        "cookie": []
      }
    },
    "moduleVariablesMap": {
      "4788005": []
    },
    "isServerBuild": true,
    "isTestFlowControl": true,
    "collectionDefinition": {
      "apifoxCli": "1.2.21",
      "item": [
        {
          "item": [
            {
              "id": "553e7e1a-34df-4d48-98ba-a1e61094d537",
              "name": "发卡人员(缺失Access-Token请求头 - 负向未授权访问 - 期望返回401未授权)",
              "request": {
                "url": {
                  "protocol": "http",
                  "port": "4523",
                  "path": [
                    "mock",
                    "5737553",
                    "api",
                    "card",
                    "issueStaff"
                  ],
                  "host": [
                    "127",
                    "0",
                    "0",
                    "1"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "key": "User-Agent",
                    "value": "app/1.0.0"
                  }
                ],
                "method": "POST",
                "baseUrl": "http://127.0.0.1:4523/mock/5737553",
                "body": {
                  "mode": "formdata",
                  "formdata": [
                    {
                      "disabled": false,
                      "key": "name",
                      "value": "王",
                      "type": "string"
                    },
                    {
                      "disabled": false,
                      "key": "deptIds",
                      "value": "58170241-F955-D161-E1B1-8988261ED595,A572DE95-9513-2840-48F8-F8003E88C1E8",
                      "type": "string"
                    }
                  ]
                },
                "auth": {
                  "type": "noauth",
                  "noauth": []
                },
                "type": "http"
              },
              "response": [],
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "id": "commonScript.assertion",
                    "type": "text/javascript",
                    "exec": [
                      "",
                      "  ____string2Array = function(value) {",
                      "    if(typeof value === 'object'){",
                      "      return value;",
                      "    }",
                      "    try {",
                      "      return JSON.parse(value);",
                      "    } catch (e) {",
                      "      return value;",
                      "    }",
                      "  }",
                      "  ____string2Number = function(value, errorMsg) {",
                      "   if(typeof value !== 'string'){",
                      "     return value;",
                      "   }",
                      "   if (/^\\-?\\d+$/.test(value)) {",
                      "       return parseInt(value);",
                      "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                      "       return parseFloat(value);",
                      "   } else {",
                      "       throw new Error(errorMsg || 'Data type mismatch')",
                      "   }",
                      " }",
                      "",
                      "  ____formatValues = function(value, stringCompareValue, comparison) {",
                      "   try{",
                      "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                      "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                      "     let compareValue;",
                      "     switch (typeof value) {",
                      "         case 'string':",
                      "             if (isNumberComparisons) {",
                      "                value = ____string2Number(value);",
                      "                compareValue = ____string2Number(stringCompareValue);",
                      "             } else if (isCollectionComparisons) {",
                      "                compareValue = ____string2Array(stringCompareValue);",
                      "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                      "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                      "             } else {",
                      "                compareValue = stringCompareValue;",
                      "             }",
                      "             break;",
                      "         case 'object':",
                      "             const isArray = value instanceof Array;",
                      "             if (isNumberComparisons) {",
                      "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                      "             } else if (isCollectionComparisons && isArray) {",
                      "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                      "            } else if (",
                      "              isArray &&",
                      "              comparison === 'include' &&",
                      "              value.includes(stringCompareValue)",
                      "            ) {",
                      "              compareValue = stringCompareValue;",
                      "            } else {",
                      "              try {",
                      "                  compareValue = JSON.parse(stringCompareValue);",
                      "              } catch (e) {",
                      "                  compareValue = stringCompareValue;",
                      "              }",
                      "            }",
                      "             break;",
                      "         case 'boolean':",
                      "             if (isNumberComparisons || isCollectionComparisons) {",
                      "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                      "             }",
                      "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                      "             break;",
                      "           case 'bigint':",
                      "           case 'number':",
                      "             if (isNumberComparisons) {",
                      "               compareValue = ____string2Number(stringCompareValue);",
                      "             } else if (isCollectionComparisons) {",
                      "              compareValue = ____string2Array(stringCompareValue);",
                      "              value = '' + value;",
                      "            } else {",
                      "               compareValue = stringCompareValue;",
                      "               value = '' + value;",
                      "             }",
                      "             break;",
                      "         case 'null':",
                      "             if (isNumberComparisons) {",
                      "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                      "             }",
                      "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                      "             break;",
                      "         default:",
                      "            if (isCollectionComparisons) {",
                      "              compareValue = ____string2Array(stringCompareValue);",
                      "            } else {",
                      "              compareValue = stringCompareValue;",
                      "            }",
                      "            break;",
                      "     }",
                      "     return { compareValue, value };",
                      "   } catch(e) {",
                      "     console.log(e);",
                      "     throw e;",
                      "   }",
                      " }",
                      " "
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "id": "postProcessors.0.assertion",
                    "type": "text/javascript",
                    "exec": [
                      "",
                      "        if (JSON.setEnableBigInt) {",
                      "          JSON.setEnableBigInt(undefined);",
                      "        }",
                      "        ",
                      "  async function ____replaceIn(value) {",
                      "    if (typeof pm.variables.replaceInAsync === 'function') {",
                      "      return await pm.variables.replaceInAsync(value);",
                      "    }",
                      "    return pm.variables.replaceIn(value);",
                      "  };",
                      "",
                      "  ;(async () => {",
                      "    try {",
                      "      const formattedName = await ____replaceIn(`验证返回401未授权状态码`);",
                      "      pm.test(formattedName, async function(done) {",
                      "        try {",
                      "          ",
                      "          const expression = await ____replaceIn(\"\");",
                      "          const value = pm.response.code",
                      "      ",
                      "          ",
                      "    const compareValue = await ____replaceIn(`401`);",
                      "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                      "  ",
                      "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                      "          done();",
                      "        } catch (err) {",
                      "          done(err);",
                      "        }",
                      "      });",
                      "    } catch(e) {",
                      "      setImmediate(() => { throw e });",
                      "    }",
                      "  })();",
                      "      "
                    ]
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "id": "postProcessors.1.assertion",
                    "type": "text/javascript",
                    "exec": [
                      "",
                      "        if (JSON.setEnableBigInt) {",
                      "          JSON.setEnableBigInt(undefined);",
                      "        }",
                      "        ",
                      "  async function ____replaceIn(value) {",
                      "    if (typeof pm.variables.replaceInAsync === 'function') {",
                      "      return await pm.variables.replaceInAsync(value);",
                      "    }",
                      "    return pm.variables.replaceIn(value);",
                      "  };",
                      "",
                      "  ;(async () => {",
                      "    try {",
                      "      const formattedName = await ____replaceIn(`验证响应包含未授权提示信息`);",
                      "      pm.test(formattedName, async function(done) {",
                      "        try {",
                      "          ",
                      "          const expression = await ____replaceIn(`$.message`);",
                      "          const JSONPath = require('jsonpath-plus').JSONPath;",
                      "          let jsonData;",
                      "          try {",
                      "            jsonData = pm.response.json();",
                      "          } catch(e) {",
                      "            let text = pm.response.text();",
                      "            const xml2js = require('xml2js');",
                      "            function removeXmlUselessPrefixAndSuffix(text) {",
                      "              const start = text.indexOf('<');",
                      "              const end = text.lastIndexOf('>');",
                      "              if (start === -1 || end === -1) {",
                      "                return text;",
                      "              }",
                      "              return text.substring(start, end + 1);",
                      "            }",
                      "            text = removeXmlUselessPrefixAndSuffix(text);",
                      "            let json;",
                      "            let xmlParseOptions = {",
                      "                explicitArray: false,",
                      "                trim: true,",
                      "                ignoreAttrs: true,",
                      "            };",
                      "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                      "                jsonData = result;",
                      "            });",
                      "          }",
                      "          let value = JSONPath({",
                      "            json: jsonData,",
                      "            path: expression,",
                      "            wrap: false",
                      "          });",
                      "",
                      "          if (false && undefined !== undefined) {",
                      "            if (Array.isArray(value)) {",
                      "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                      "            } else {",
                      "              value = undefined;",
                      "            }",
                      "          }",
                      "",
                      "          ",
                      "          ",
                      "    const compareValue = await ____replaceIn(`未授权`);",
                      "    const formattedValues = ____formatValues(value, compareValue, 'include');",
                      "  ",
                      "          pm.expect(formattedValues.value).to.include(formattedValues.compareValue);",
                      "          done();",
                      "        } catch (err) {",
                      "          done(err);",
                      "        }",
                      "      });",
                      "    } catch(e) {",
                      "      setImmediate(() => { throw e });",
                      "    }",
                      "  })();",
                      "      "
                    ]
                  }
                }
              ],
              "type": "http",
              "metaInfo": {
                "blockId": "92e6127b-1960-4d0f-9c6c-160b356162a1",
                "id": "92e6127b-1960-4d0f-9c6c-160b356162a1",
                "type": "http",
                "projectId": 5737553,
                "relatedId": 372906771,
                "environmentId": 28635397,
                "blockNumber": 1,
                "tags": [],
                "httpApiId": 372906771,
                "httpApiCaseId": 317386461,
                "httpApiName": "发卡人员",
                "httpApiPath": "/api/card/issueStaff",
                "httpApiMethod": "post",
                "httpApiCaseName": "缺失Access-Token请求头 - 负向未授权访问 - 期望返回401未授权",
                "moduleId": 4788005,
                "serverId": "default"
              },
              "protocolProfileBehavior": {
                "useWhatWGUrlParser": false,
                "disableUrlEncoding": false,
                "disabledSystemHeaders": {},
                "disableCookies": false
              },
              "responseDefinition": {
                "validateDeletedResponse": false
              },
              "requestDefinition": {
                "jsonSchema": {},
                "examples": []
              },
              "overrideRequesterOptions": {
                "strictSSL": false
              }
            }
          ],
          "name": "发卡人员"
        }
      ],
      "info": {
        "name": "发卡人员"
      },
      "dataSchemas": {},
      "mockRules": {
        "rules": [],
        "enableSystemRule": true
      },
      "environment": {
        "id": 28635397,
        "name": "本地 Mock",
        "type": "mock",
        "baseUrls": {
          "default": "http://127.0.0.1:4523/mock/5737553"
        },
        "websocketBaseUrls": {},
        "socketioBaseUrls": {},
        "baseUrl": "http://127.0.0.1:4523/mock/5737553",
        "variable": {
          "id": "8856f526-7949-4f32-b7d3-783861aefba9",
          "name": "本地 Mock",
          "baseUrl": "http://127.0.0.1:4523/mock/5737553",
          "baseUrls": {
            "default": "http://127.0.0.1:4523/mock/5737553"
          },
          "values": []
        },
        "parameter": {
          "header": [],
          "query": [],
          "body": [],
          "cookie": []
        },
        "advancedSettings": {}
      },
      "globals": {
        "baseUrls": {},
        "websocketBaseUrls": {},
        "socketioBaseUrls": {},
        "baseUrl": "",
        "variable": {
          "id": "188f74ee-a481-4ad6-abeb-90fe4b9be743",
          "baseUrl": "",
          "baseUrls": {},
          "values": [
            {
              "type": "any",
              "value": "",
              "key": "uuid",
              "isBindInitial": true,
              "initialValue": ""
            },
            {
              "type": "any",
              "value": "",
              "key": "提取菜品uuid",
              "isBindInitial": true,
              "initialValue": ""
            },
            {
              "type": "any",
              "value": "",
              "key": "提取菜品名称",
              "isBindInitial": true,
              "initialValue": ""
            },
            {
              "type": "any",
              "value": "",
              "key": "to",
              "isBindInitial": true,
              "initialValue": ""
            },
            {
              "type": "any",
              "value": "",
              "key": "shijian",
              "isBindInitial": true,
              "initialValue": ""
            },
            {
              "type": "any",
              "value": "",
              "key": "dateFromTempVariable",
              "isBindInitial": true,
              "initialValue": ""
            },
            {
              "type": "any",
              "value": "",
              "key": "cee",
              "isBindInitial": true,
              "initialValue": ""
            },
            {
              "type": "any",
              "value": "",
              "key": "sh",
              "isBindInitial": true,
              "initialValue": ""
            },
            {
              "type": "any",
              "value": "admin",
              "key": "account-dev",
              "isBindInitial": true,
              "initialValue": "admin"
            },
            {
              "type": "any",
              "value": "Admin@2025#User&88",
              "key": "pwd-dev",
              "isBindInitial": true,
              "initialValue": "Admin@2025#User&88"
            },
            {
              "type": "any",
              "value": "K8P3Z2X7Q9W1E4R6T5Y3U8D2F1G7H9",
              "key": "key-dev",
              "isBindInitial": true,
              "initialValue": "K8P3Z2X7Q9W1E4R6T5Y3U8D2F1G7H9"
            }
          ]
        },
        "parameter": {
          "header": [],
          "query": [],
          "body": [],
          "cookie": []
        }
      },
      "teamGlobals": {
        "baseUrls": {},
        "websocketBaseUrls": {},
        "socketioBaseUrls": {},
        "baseUrl": "",
        "variable": {
          "id": "6a0dd6c6-3618-4e50-9e00-cdce613f555b",
          "baseUrl": "",
          "baseUrls": {},
          "values": []
        },
        "parameter": {
          "header": [],
          "query": [],
          "body": [],
          "cookie": []
        }
      },
      "moduleVariablesMap": {
        "4788005": []
      },
      "defaultModuleId": 4788005,
      "isServerBuild": true,
      "isTestFlowControl": true,
      "projectAssociationMap": {},
      "testDataMap": {},
      "databaseConnectionMap": {
        "124921": {
          "id": 124921,
          "createdAt": "2025-11-18T01:30:01.000Z",
          "updatedAt": "2025-11-18T01:30:01.000Z",
          "deletedAt": null,
          "name": "麒麟系统瀚高数据库",
          "type": "postgresql",
          "projectId": 5737553,
          "description": "麒麟系统瀚高数据库",
          "configs": {
            "default": {
              "port": "5866"
            }
          }
        }
      }
    },
    "runOptions": {
      "environmentId": 28635397,
      "useDataSetId": -1,
      "threadCount": 1,
      "iterationCount": 1,
      "delayItem": 0,
      "saveVariables": true,
      "saveReportDetail": "all",
      "readGlobalCookie": false,
      "saveGlobalCookie": false,
      "onError": "ignore",
      "runnerId": 0
    },
    "projectOptions": {
      "enableJsonc": true,
      "enableBigint": false,
      "responseValidate": true,
      "isDefaultUrlEncoding": 2,
      "enableTestScenarioSetting": false,
      "enableYAPICompatScript": false,
      "publishedDocUrlRules": {
        "defaultRule": "RESOURCE_KEY_ONLY",
        "resourceKeyStandard": "LEGACY"
      },
      "folderShareExpandModeSettings": {
        "expandId": [],
        "mode": "AUTO"
      },
      "mockSettings": {},
      "language": "zh-CN"
    },
    "ciRunningOptions": {
      "environmentId": 28635397,
      "useDataSetId": -1,
      "threadCount": 1,
      "iterationCount": 1,
      "delayItem": 0,
      "saveVariables": true,
      "saveReportDetail": "all",
      "readGlobalCookie": false,
      "saveGlobalCookie": false,
      "onError": "ignore",
      "runnerId": 0
    },
    "projectId": 5737553,
    "databaseConnectionMap": {
      "124921": {
        "id": 124921,
        "createdAt": "2025-11-18T01:30:01.000Z",
        "updatedAt": "2025-11-18T01:30:01.000Z",
        "deletedAt": null,
        "name": "麒麟系统瀚高数据库",
        "type": "postgresql",
        "projectId": 5737553,
        "description": "麒麟系统瀚高数据库",
        "configs": {
          "default": {
            "port": "5866"
          }
        }
      }
    },
    "testDataMap": {},
    "reportUrlTemplate": "https://app.apifox.com/link/project/{{projectId}}/api-test/test-report/{{id}}",
    "reportExtra": {
      "runOptions": {
        "environmentId": 28635397,
        "useDataSetId": -1,
        "threadCount": 1,
        "iterationCount": 1,
        "delayItem": 0,
        "saveVariables": true,
        "saveReportDetail": "all",
        "readGlobalCookie": false,
        "saveGlobalCookie": false,
        "onError": "ignore",
        "runnerId": 0
      },
      "endpoint": {
        "id": 372906771,
        "name": "发卡人员",
        "path": "/api/card/issueStaff",
        "method": "post"
      },
      "testCaseRunSource": {
        "type": "case",
        "caseId": 317386461,
        "requestedEnvironmentId": 28635397,
        "resolvedEnvironmentId": 28635397,
        "resolvedEnvironmentName": "本地 Mock",
        "isDefaultEnvironment": false
      }
    },
    "runnerId": "33d65446-2305-470e-a416-32f9275c59b9",
    "name": "发卡人员"
  }
}