Hi, perhaps this helps - from the manual, for the "invoke" step:

The result of the request is internally stored and its contents can be verified 
with one or more <verify...> steps. If the saveresponse option in the 
config<http://webtest.canoo.com/webtest/manual/config.html> element is enabled, 
the result 
(HTML<http://webtest.canoo.com/webtest/manual/annotatedRefs.html#HTML> source) 
will be written to a file for later viewing.

Also check the "saveResponse" option (below). However, I think storing the 
result of "invoke" in the results subfolder of your webtest project is the 
normal behaviour of webtest. The file should already be there - just give it a 
try once you ran your "invoke" step. It should be called something similar to 
the step name...

saveResponse
Required? no
Whether to make a permanent copy of received responses. Overrides the default 
value set in
the <config> element.

Once you have finished your scripted processing of the Excel file, a separate 
"invoke" on the processed file should provide you with what you wanted to 
get... let us know if that helped.

HTH
Thomas


Thomas Klein
Senior Associate, QA | SapientNitro

________________________________
From: [email protected] [[email protected]] On Behalf 
Of Michael Stephan [[email protected]]
Sent: Tuesday, June 22, 2010 11:27
To: [email protected]
Subject: [Webtest] invoke stores response to harddisk, how to get path to 
locally stored response in following groovy step


Dear all,

I have the following problem. I'm triggering two commands, the first is a 
simple invoke, the second is some groovy code. In the groovy code I would need 
to access the response which was stored to the file in the invoke step.

1) <invoke .....>: stores the response (which is an excel file, resulting in an 
UnexpectedPage) to a local file

2) <groovy .....>: how to get the path to the locally stored response

I already tried to access the filename with step.context.currentResponseFile 
but this is set to NULL. Maybe you could help me finding a solution.


Thanks,
Michael

Reply via email to