枫飞林 发表于 2010-1-21 18:15:42

loadrunner 9.5 回放脚本,数据库没有数据录入,was日志有错

这是我的loadrunner 代码
addrole()
{


        lr_think_time(10);
    lr_log_message("wait for mement");
//        lr_start_transaction("start");
        web_custom_request("nodes",
                "URL=https://9.181.86.102:9445/BusinessLeader/rest/v1/document/DOC-bb1cbdef1f37d13c8057a2b687e2cc58/nodes?spaceId=09B55666986DA34B640F00F72AF4AD000002&actionType=search&firstRow=2&lastRow=5",
                   "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=https://9.181.86.102:9445/mum/enabler",
                "Snapshot=t57.inf",
                "Mode=HTML",
                "EncType=application/json; charset=utf-8",
          "Body={\"actionType\":\"search\",\"properties\":{\"name\":\"role_001\",\"types\":[\"glossaryNodeUserRole\"]}}",
                LAST);
lr_log_message("wait for mement");

/*
        web_custom_request("DOC-bb1cbdef1f37d13c8057a2b687e2cc58",
                "URL=https://9.181.86.102:9445/BusinessLeader/rest/v1/document/DOC-bb1cbdef1f37d13c8057a2b687e2cc58?spaceId=09B55666986DA34B640F00F72AF4AD000002&actionType=batch&locale=en_US",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=https://9.181.86.102:9445/BusinessLeaderWidgets/com/ibm/busleader/widgets/documenteditor/EditorApplication.swf",
                "Snapshot=t58.inf",
                "Mode=HTML",
                "EncType=text/json;charset=UTF-8",
                "Body={\"actions\":[{\"actionType\":\"addNode\",\"node\":{\"visibility\":\"0\",\"type\":\"glossaryNodeUserRole\",\"name\":\"222\",\"id\":\"NOD-1\",\"desc\":\"111\"}}]}",
   //         {"actions":[{"actionType":"addNode","node":{"type":"glossaryNodeTerm","name":"term_user1_1","id":"NOD-ca0c4cfabfe10c19494a68b64b535854","desc":"term_user1_1","visibility":"0"}}]}
                                           LAST);

        web_custom_request("DOC-bb1cbdef1f37d13c8057a2b687e2cc58_2",
                "URL=https://9.181.86.102:9445/BusinessLeader/rest/v1/document/DOC-bb1cbdef1f37d13c8057a2b687e2cc58?actionType=unlock&spaceId=09B55666986DA34B640F00F72AF4AD000002&locale=en_US",
                "Method=POST",
                "Resource=0",
                "RecContentType=application/json",
                "Referer=https://9.181.86.102:9445/BusinessLeaderWidgets/com/ibm/busleader/widgets/documenteditor/EditorApplication.swf",
                "Snapshot=t59.inf",
                "Mode=HTML",
                "EncType=text/json;charset=UTF-8",
                "Body={\"checkpoint\":{}}",
                LAST);
*/
        return 0;
}

这是后台的错误日志

0000001d RestHandlerHe E com.ibm.bscape.rest.util.RestHandlerHelper writeJSONOutput(JSONObject,HttpServletResponse) ylcao --- POST: pathInfo: /document/DOC-bb1cbdef1f37d13c8057a2b687e2cc58/nodesqueryString: spaceId=09B55666986DA34B640F00F72AF4AD000002&actionType=search&firstRow=2&lastRow=5{"Error":"BCSP2012E: Invalid request data.","Status Code":400}
0000001c CreateDocumen E com.ibm.bscape.rest.handler.action.CreateDocumentAction execute java.lang.String incompatible with com.ibm.json.java.JSONObject
0000001c RestHandlerHe E com.ibm.bscape.rest.util.RestHandlerHelper writeJSONOutput(JSONObject,HttpServletResponse) ylcao --- POST: pathInfo: /document/DOC-bb1cbdef1f37d13c8057a2b687e2cc58/nodesqueryString: spaceId=09B55666986DA34B640F00F72AF4AD000002&actionType=search&firstRow=2&lastRow=5{"Error":"BCSP2012E: Invalid request data.","Status Code":400}
0000001c CreateDocumen E com.ibm.bscape.rest.handler.action.CreateDocumentAction execute java.lang.String incompatible with com.ibm.json.java.JSONObject
0000001c RestHandlerHe E com.ibm.bscape.rest.util.RestHandlerHelper writeJSONOutput(JSONObject,HttpServletResponse) ylcao --- POST: pathInfo: /document/DOC-bb1cbdef1f37d13c8057a2b687e2cc58/nodesqueryString: spaceId=09B55666986DA34B640F00F72AF4AD000002&actionType=search&firstRow=2&lastRow=5{"Error":"BCSP2012E: Invalid request data.","Status Code":400}
这是loadrunner回放日志
Starting action addrole.
wait for mement
addrole.c(8): web_custom_request("nodes") was successful, 62 body bytes, 196 header bytes, 11 chunking overhead bytes       
wait for mement
页: [1]
查看完整版本: loadrunner 9.5 回放脚本,数据库没有数据录入,was日志有错