LR script fails with 412 PRECONDITION FAILED Error.

353 views
Skip to first unread message

srikant

unread,
Jul 27, 2011, 9:45:10 PM7/27/11
to LoadRunner
Hi Team,

I have created a script for a web application, in which the flow is
like opening a word doc in browser, editing it and saving it. But when
i run the script, in the Edit transaction, it gets fails throwing this
error :- 412 PRECONDITION FAILED Error. I have pasted the "web custom
request" at which the error was thrown. Could any one of us look into
this and share your valuable inputs on the same. It would be really
helpful, as i am working on this for a week.. :(

web_custom_request("OneNote.ashx",
"URL=https://teams.aexp.com/sites/r1testsite5/_vti_bin/
OneNote.ashx",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=https://teams.aexp.com/sites/r1testsite5/_layouts/
WordEditorFrame.aspx?d={hFrameID}&source=https%3A%2F%2Fteams%2Eaexp
%2Ecom%2Fsites%2Fr1testsite5%2FShared%2520Documents%2FForms%2FAllItems
%2Easpx",
"Snapshot=t82.inf",
"Mode=HTTP",
"EncType=application/json; charset=utf-8",
"Body={\"Mode\":2,\"srs\":[[1,{\"DependentOn\":0,\"FileId\":
\"d={hFrameID}\",\"PageTarget\":\"\",\"BrowserId\":\"145e1d77-
c75c-4072-be94-9a6b6f8e1512|1\",\"OperationId\":1}]]}",
LAST);

Oliver Lloyd

unread,
Jul 28, 2011, 7:29:37 PM7/28/11
to LoadRunner
I think this might be json's fault. You've got brackets within
brackets. I've not come across this myself as I've been using jmeter
of late and this uses the ${} format for variables which removes this
problem. I've read around though, and the two options below might
work. But this is second-hand advice so beware.

You could try changing what LR uses to define a parameter from {} to
something else, like, well, not (, [ or { as these are reserved for
json. Or you could make use of the new data format extension feature
of LR11.

I might play with this tomorrow; json is getting popular and I'm
getting rusty!

srikaanth s

unread,
Aug 1, 2011, 8:37:45 PM8/1/11
to lr-loa...@googlegroups.com
Thanks Oliver..I am working on the same.

--
You received this message because you are subscribed to the Google "LoadRunner" group.
To post to this group, send email to LR-Loa...@googlegroups.com
To unsubscribe from this group, send email to
LR-LoadRunne...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en

Reply all
Reply to author
Forward
0 new messages