Hi Michael,

Thanks for your reply. I tried the dynamic properties you've suggested, but it 
still doesn't work.

I thought it was an ant issue at the beginning as well. Therefore I tried the 
ant-contrib (http://ant-contrib.sourceforge.net/), which offers the possibility 
to overwrite properties by using the var - Task. I tried the "var" task, but it 
didn't work. And then I tried the "var" task with other properties and 
overwritting was now possible. 

As far as I know, using properties in different ant files isn't a problem. That 
said, one can use properties as described here: 
http://webtest.canoo.com/webtest/manual/samples.html#Property%20Usage
without problem.  

That's why I don't think it's a ant problem, rather than a webtest problem.

Regards,
Daniel


Am 18.03.2011 um 13:36 schrieb Habbert, Michael (Key-Work):

> Hi Daniel,
> 
> this seems to me a feature of ant.
> 
> If you set a plain old ant property you can not change it for ever.
> 
> May be you try dynamic webtes-properties 
> (http://webtest.canoo.com/webtest/manual/properties.html).
> 
> With kind regards
> 
> Michael Habbert
> 
> Michael Habbert
> Key-Work Consulting GmbH | Kriegsstr. 100 | 76133 Karlsruhe | Germany | 
> www.key-work.de
> Fon: +49-721-78203-269 | E-Mail: [email protected] | Fax: 
> +49-721-78203-10
> 
> Key-Work Consulting GmbH Karlsruhe, HRB 108695, HRG Mannheim
> Geschäftsführer: Andreas Stappert, Tobin Wotring
> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:[email protected]] Im 
> Auftrag von Daniel Plappert
> Gesendet: Freitag, 18. März 2011 12:57
> An: [email protected]
> Betreff: [Webtest] different client certificates
> 
> Hi all,
> 
> I am trying to test my application by using different client certificates in 
> order to simulate different users. But, unfortunately, this seems to be 
> impossible with Canoo. What I did so far:
> 
> Test 1:
> 
> <target name="testAdminAccess">
> 
>      <property name="webtest.keystore.file" 
> value="src/test/webtest/keystore.jks"/>
>      <property name="webtest.keystore.passphrase" value="PASSWORD"/>
>      <property name="webtest.truststore.file" 
> value="src/test/resources/keystore"/>
>      <property name="webtest.truststore.passphrase" value="PASSWORD"/>
>      <property name="webtest.connectioninitializer" 
> value="com.canoo.webtest.security.SunJsseClientAuthConnectionInitializer"/>
> 
>     <webtest name="First login">
> 
>        <config
>                host="localhost"
>                port="9543"
>                protocol="https"
>                saveresponse="true"
>                showhtmlparseroutput="true"
>                resultfile="webtest-result"
>                summary="true">
>        </config>
> 
>         .... more stuff
> 
> 
> Test 2:
> 
>  <target name="all">
> 
>      <property name="webtest.keystore.file" 
> value="src/test/webtest/keystore-testuser.jks"/>
>      <property name="webtest.keystore.passphrase" value="PASSWORD"/>
>      <property name="webtest.truststore.file" 
> value="src/test/resources/keystore"/>
>      <property name="webtest.truststore.passphrase" value="PASSWORD"/>
>      <property name="webtest.connectioninitializer" 
> value="com.canoo.webtest.security.SunJsseClientAuthConnectionInitializer"/>
> 
>      <webtest name="Login with a different user">
> 
>          <config
>                host="another-test-server"
>                port="443"
>                protocol="https"
>                saveresponse="true"
>                showhtmlparseroutput="true"
>                resultfile="webtest-result"
>                summary="true">
>        </config>
> 
>        ... more stuff
> 
> 
> If I run this two tests separately, it works. Separately means:
> 
> webtest.sh -f test1
> webtest.sh -f test2
> 
> However, by running these two tests together it doesn't work. The problem is 
> that Canoo sends the first certificate to both server: localhost and 
> another-test-server. Setting the properties in the second test doesn't have 
> an effect. The test, which has been executed first will set the certificate 
> for every other tests regardless the different properties (more precisely: 
> webtest.keystore.file, webtest.keystore.passphrase, webtest.truststore.file, 
> webtest.truststore.passphrase and webtest.connectioninitializer can not be 
> overwritten in further tests).
> 
> So, this seems to be a bug to me. Or did I miss something? I am using Canoo 
> R_1758.
> 
> I appreciate your thoughts and help!
> 
> Regards,
> Daniel
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to