gpt4 book ai didi

java - Gatling:脚本执行时出现错误, "could not prepare: Boon failed to parse into a valid AST: -1"

转载 作者:行者123 更新时间:2023-11-30 08:34:37 26 4
gpt4 key购买 nike

请考虑场景...

我正在为我的 Web 应用程序创建 CreateNewFolder 脚本。

    .exec(http("request_")
.post("/url/home")
.formParam("action_id", "9")
.formParam("projectId", "${projectId}")
.formParam("isForEdit", "false")
.check(jsonPath("$.distData.roleList[25].roleId").saveAs("roleId"))
.check(jsonPath("$.distData.userList[10].userID").saveAs("userID")))
.exec(http("Create_New_Folder")
.post("/url/home")
.formParam("action_id", "7")
.formParam("projectId", "${projectId}")
.formParam("folderId", "0")
.formParam("AdminRoleId", "${roleId}")
.formParam("isWorkspace", "1")
.formParam("extra", """{"folderName":"+dateTime+","security":{"defaults":[{"name":"defalt","acessId":1}],"users":[{"hashedUserId":"${userID}","userName":"User112"}],"roles":[{"roleId":"${roleId}","roleName":"Administrator"}]}}"""))
.pause(3)

谁能指导我,为什么会这样???

完整的错误消息:“jsonPath($.distData.roleList[25].roleId).find(0).exists 失败,无法准备:Boon 无法解析为有效的 AST:-1”

非常感谢您的帮助。

谢谢,普拉文莫雅

最佳答案

您的 HTTP 响应负载不是 JSON。

关于java - Gatling:脚本执行时出现错误, "could not prepare: Boon failed to parse into a valid AST: -1",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38760366/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com