loadrunner 回放报错26611

Action.c(52): 错误 -26611: 对于“https://cloud.huaxiaerp.com/jshERP-boot/user/infoWithTenant%E2%80%9D%EF%BC%8CHTTP 状态代码=500 (Internal Server Error) [MsgId: MERR-26611]

Action()
{

    web_set_sockets_option("SSL_VERSION", "AUTO");

    web_add_auto_header("Accept-Language", 
        "zh-CN,zh;q=0.9");

    web_url("login", 
        "URL=https://cloud.huaxiaerp.com/user/login", 
        "Resource=0", 
        "RecContentType=text/html", 
        "Referer=", 
        "Snapshot=t1.inf", 
        "Mode=HTML", 
        EXTRARES, 
        "Url=../jshERP-boot/platformConfig/getPlatform/name", ENDITEM, 
        "Url=../jshERP-boot/platformConfig/getPlatform/url", ENDITEM, 
        "Url=../static/Android.png", ENDITEM, 
        "Url=../static/rightImg.png?v=320", ENDITEM, 
        "Url=../static/bgimg.png?v=1", "Referer=https://cloud.huaxiaerp.com/css/app.3c86638a.css", ENDITEM, 
        "Url=../static/mini-program.png", ENDITEM, 
        "Url=../static/iPhone.png", ENDITEM, 
        "Url=../js/chunk-f82bb024.c9babcc5.js", ENDITEM, 
        LAST);

    web_add_cookie("Hm_lvt_1cd9bcbaae133f03a6eb19da6579aaba=1694946265; DOMAIN=cloud.huaxiaerp.com");

    web_add_cookie("Hm_lpvt_1cd9bcbaae133f03a6eb19da6579aaba=1694946265; DOMAIN=cloud.huaxiaerp.com");

    web_url("registerFlag", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/platformConfig/getPlatform/registerFlag", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/user/login", 
        "Snapshot=t2.inf", 
        "Mode=HTML", 
        LAST);

    web_custom_request("login_2", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/user/login", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/user/login", 
        "Snapshot=t3.inf", 
        "Mode=HTML", 
        "EncType=application/json;charset=UTF-8", 
        "Body={\"loginName\":\"ggbond\",\"password\":\"89c1c01fa0fdae8e1e01b77a3e480aaa\"}", 
        LAST);

    web_url("infoWithTenant", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/user/infoWithTenant", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/user/login", 
        "Snapshot=t4.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getAllList", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/materialProperty/getAllList", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/user/login", 
        "Snapshot=t5.inf", 
        "Mode=HTML", 
        LAST);

    web_custom_request("findMenuByPNumber", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/function/findMenuByPNumber", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/user/login", 
        "Snapshot=t6.inf", 
        "Mode=HTML", 
        "EncType=application/json;charset=UTF-8", 
        "Body={\"pNumber\":0,\"userId\":143473}", 
        LAST);

    web_url("getInfoByKey", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/platformConfig/getInfoByKey?platformKey=bill_excel_url", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/user/login", 
        "Snapshot=t7.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getInfoByKey_2", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/platformConfig/getInfoByKey?platformKey=pay_fee_url", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", 
        "Snapshot=t8.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getCurrentInfo", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/systemConfig/getCurrentInfo", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", 
        "Snapshot=t9.inf", 
        "Mode=HTML", 
        LAST);

    web_url("list", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/msg/list?search=%7B%22name%22:%22%22%7D&column=createTime&order=desc&field=id,,msgTitle,type,createTimeStr,action&currentPage=1&pageSize=5", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", 
        "Snapshot=t10.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getBuyAndSaleStatistics", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/depotHead/getBuyAndSaleStatistics?roleType=%E5%85%A8%E9%83%A8%E6%95%B0%E6%8D%AE", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", 
        "Snapshot=t11.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getMsgByStatus", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/msg/getMsgByStatus?status=1", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", 
        "Snapshot=t12.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getInfoByKey_3", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/platformConfig/getInfoByKey?platformKey=pay_fee_url", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", 
        "Snapshot=t13.inf", 
        "Mode=HTML", 
        EXTRARES, 
        "Url=/img/light.262af236.svg", "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", ENDITEM, 
        LAST);

    web_url("buyOrSalePrice", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/depotItem/buyOrSalePrice?roleType=%E5%85%A8%E9%83%A8%E6%95%B0%E6%8D%AE", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", 
        "Snapshot=t14.inf", 
        "Mode=HTML", 
        LAST);

    web_url("infoWithTenant_2", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/user/infoWithTenant", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", 
        "Snapshot=t15.inf", 
        "Mode=HTML", 
        EXTRARES, 
        "Url=/img/dark.da07f9c2.svg", "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", ENDITEM, 
        LAST);

    web_url("infoWithTenant_3", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/user/infoWithTenant", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/dashboard/analysis", 
        "Snapshot=t16.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getMaterialCategoryTree", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/materialCategory/getMaterialCategoryTree?id=", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t17.inf", 
        "Mode=HTML", 
        LAST);

    web_url("list_2", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/material/list?search=%7B%22categoryId%22:%22%22,%22materialParam%22:%22%22,%22color%22:%22%22,%22materialOther%22:%22%22,%22weight%22:%22%22,%22expiryNum%22:%22%22,%22enabled%22:%22%22,%22enableSerialNumber%22:%22%22,%22enableBatchNumber%22:%22%22,%22position%22:%22%22,%22remark%22:%22%22,%22mpList%22:%22%E5%88%B6%E9%80%A0%E5%95%86,%E8%87%AA%E5%AE%9A%E4%B9%891,%E8%87%AA%E5%AE%9A%E4%B9%892,%E8%87%AA%E5%AE%9A%E4%B9%893%22%7D&column=createTime&order=desc&"
        "field=id,&currentPage=1&pageSize=10", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t18.inf", 
        "Mode=HTML", 
        LAST);

    lr_think_time(5);

    web_url("getAllListWithStock", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/depot/getAllListWithStock?mId=0", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t19.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getMaterialCategoryTree_2", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/materialCategory/getMaterialCategoryTree?id=", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t20.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getNameList", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/materialAttribute/getNameList", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t21.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getAllList_2", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/unit/getAllList?currentPage=1&pageSize=100", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t22.inf", 
        "Mode=HTML", 
        LAST);

    web_url("fileSizeLimit", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/systemConfig/fileSizeLimit", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t23.inf", 
        "Mode=HTML", 
        LAST);

    web_url("getMaxBarCode", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/material/getMaxBarCode", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t24.inf", 
        "Mode=HTML", 
        LAST);

    lr_rendezvous("R_SPAdd");

    lr_think_time(4);

    web_url("checkIsBarCodeExist", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/materialsExtend/checkIsBarCodeExist?barCode=10005&id=0", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t25.inf", 
        "Mode=HTML", 
        LAST);

    web_url("checkIsBarCodeExist_2", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/materialsExtend/checkIsBarCodeExist?barCode=10005&id=0", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t26.inf", 
        "Mode=HTML", 
        LAST);

    web_url("checkIsBarCodeExist_3", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/materialsExtend/checkIsBarCodeExist?barCode=10005&id=0", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t27.inf", 
        "Mode=HTML", 
        LAST);

    web_url("checkIsBarCodeExist_4", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/materialsExtend/checkIsBarCodeExist?barCode=10005&id=0", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t28.inf", 
        "Mode=HTML", 
        LAST);

    lr_think_time(11);

    lr_start_transaction("T_SPAdd");

    web_url("checkIsBarCodeExist_5", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/materialsExtend/checkIsBarCodeExist?barCode=10005&id=0", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t29.inf", 
        "Mode=HTML", 
        LAST);

    web_url("checkIsExist", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/material/checkIsExist?id=0&name=SPHF8888&model=&color=&standard=&mfrs=&otherField1=&otherField2=&otherField3=&unit=%E6%B8%85%E5%8D%8E%E5%A4%A7%E5%AD%A6&unitId=", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t30.inf", 
        "Mode=HTML", 
        LAST);

    web_custom_request("add", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/material/add", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t31.inf", 
        "Mode=HTML", 
        "EncType=application/json;charset=UTF-8", 
        "Body={\"name\":\"SPHF8888\",\"unit\":\"清华大学\",\"meList\":[{\"id\":\"16949462897290445048\",\"barCode\":\"10005\",\"commodityUnit\":\"清华大学\",\"sku\":\"\",\"purchaseDecimal\":\"\",\"commodityDecimal\":\"\",\"wholesaleDecimal\":\"\",\"lowDecimal\":\"\"}],\"stock\":[],\"sortList\":[],\"unitId\":\"\",\"imgName\":\"\",\"meDeleteIdList\":[]}", 
        LAST);

    web_url("list_3", 
        "URL=https://cloud.huaxiaerp.com/jshERP-boot/material/list?search=%7B%22categoryId%22:%22%22,%22materialParam%22:%22%22,%22color%22:%22%22,%22materialOther%22:%22%22,%22weight%22:%22%22,%22expiryNum%22:%22%22,%22enabled%22:%22%22,%22enableSerialNumber%22:%22%22,%22enableBatchNumber%22:%22%22,%22position%22:%22%22,%22remark%22:%22%22,%22mpList%22:%22%E5%88%B6%E9%80%A0%E5%95%86,%E8%87%AA%E5%AE%9A%E4%B9%891,%E8%87%AA%E5%AE%9A%E4%B9%892,%E8%87%AA%E5%AE%9A%E4%B9%893%22%7D&column=createTime&order=desc&"
        "field=id,,action,mBarCode,name,standard,model,color,categoryName,materialOther,unit,stock,purchaseDecimal,commodityDecimal,wholesaleDecimal,lowDecimal,enabled&currentPage=1&pageSize=10", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=https://cloud.huaxiaerp.com/material/material", 
        "Snapshot=t32.inf", 
        "Mode=HTML", 
        LAST);

    lr_end_transaction("T_SPAdd",LR_AUTO);

    return 0;
}

【以下回答由 GPT 生成】

问题原因分析: - 错误-26611是Loadrunner回放过程中的一种错误,意味着回放过程中遇到了服务器返回的500错误,即“Internal Server Error”。 - 这种错误通常是由于服务器端出现了异常或错误导致的,可能是由于代码bug、服务器配置问题、数据库异常等。

解决方法: 1. 确认是否是服务器的问题: - 可以尝试直接在浏览器中访问测试的URL,看看是否也会出现500错误。如果是,那么问题很可能是服务器的问题,需要联系服务器端负责人进行排查和修复。 - 如果在浏览器中正常访问,而在Loadrunner中出现错误,可以尝试增加一些HTTP头部信息,如User-Agent、Cookie等,来模拟浏览器的请求,有时可以规避一些服务器的限制。

  1. 检查Loadrunner脚本中的请求参数和逻辑:
  2. 检查脚本中的URL和参数是否正确,尤其是登录接口的请求参数是否有效。
  3. 检查请求的HTTP方法是否正确,例如确认是否应该使用POST请求而不是GET请求。
  4. 检查请求的HTTP头部信息是否缺失或错误,如User-Agent、Referer等。
  5. 检查请求的Body信息是否正确,需要根据测试接口的要求进行正确的参数设置。

  6. 尝试增加调试日志和断点:

  7. 在Loadrunner脚本中增加一些调试日志输出,例如输出请求的URL、参数和返回的报文内容,以便更详细地了解出错的原因。
  8. 可以将Loadrunner脚本中的某些关键步骤设置为断点,观察回放过程中的具体错误发生位置,以便更精确地定位问题。

  9. 尝试增加错误处理逻辑:

  10. 可以在Loadrunner脚本中增加一些错误处理逻辑,例如针对500错误进行特定的处理或重试机制。
  11. 可以使用Loadrunner提供的相关函数和语句,如web_reg_find函数来检查返回页面中是否包含了某些异常关键字,进而判断是否出错。

综上所述,根据以上的解决方法和建议,可以分析和解决Loadrunner回放报错26611的问题。但需要注意的是,由于问题的具体原因需要根据实际测试环境和接口的具体情况来判断,以上提供的解决方法仅供参考,具体情况需要根据实际情况进行分析和调试。


如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^