Re: AW: different client certificates
Daniel Plappert <[email protected]>
| Newsgroups | gmane.comp.web.canoo.webtest |
|---|---|
| Message-ID | <[email protected]> |
Hi again, this seems to be very strange. I switched the log level to debug and found out, that canoo actually sets the "new" property: [invoke] DEBUG (com.canoo.webtest.security.AbstractConnectionInitializer) - Set javax.net.ssl.keyStore to keystore-testuser2.jks, was keystore-testuser.jks But the second certificate was not the one that has been sent to the server - because once again, the first one is sent. So, the issue seems to be somewhere else? Is there some caching activated? Any thoughts? Thanks a lot. 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