[Webtest] Re: Case sensitivity on generated URL parameters problem

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Mon, 14 Jan 2008 17:45:37 +0100


Hi,

you can simply use Ant's <echo file="..."
message="sessionID='#{sessionID}"/> from your test retrieving the
session id and the Ant's <property file="..."/> in the other tests to
load the previously written session id as property.

Alternatively you can use an Ant extension that allows to pop properties
to a calling build file to make them available for the rest of the
build. The drawback of this solution is that you can't run a single test
what can is handy at conception time.

Cheers,
Marc.
-- 
Blog: http://mguillem.wordpress.com


Douglas Beattie wrote:
> Thanks for the reply Marc.
> 
> I guess I mis-communicated what I was trying to accomplish. I made some changes this morning and have now gotten the sessionID to be passed into this RESTful API to do a valid logout.
> 
> I simply changed the code for the logout to the following:
>            <invoke url="http://10.0.1.1:8080/identity/v1/logout?sessionID='#{sessionID}'"
>             description="Logout valid user"
>           />  
> 
> This was a problem with my lack of understanding on web programming than a problem with WebTest.
> 
> Now I need to study how the sessionID obtained in the original login can be saved so it can be recalled from code I wish to put in a separate .xml file which would then get called from the "allTests.xml" type file.
> Right now I have all the steps in a single .xml file that gets executed.
> 
> Thanks again though for the reply.
> 
> Doug
>  
>>>> Marc Guillemot <mguillemot@yahoo.fr> 01/14/08 8:09 AM >>> 
> Hi,
> 
> attribute are not case sensitive in an Ant file but invoke doesn't have
> any sessionId attribute, no matter with which case it is written.
> 
> Cheers,
> Marc.
> --  
> Blog: http://mguillem.wordpress.com
> 
> 
> Douglas Beattie wrote:
>> In the following code: 
>>           <invoke url="http://10.0.1.1:8080/identity/v1/logout" sessionId="#{sessionID}"
>>             description="Logout valid user"
>>             property="sessionID"
>>           />
> ...
> 
> 
> ----------------------------------------------------------------------
> NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.