请考虑这种情况...
我正在创建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”
您的帮助将不胜感激。
谢谢,
Praveen Mourya
最佳答案
您的HTTP响应有效负载不是JSON。