AW: different client certificates

"Habbert, Michael (Key-Work)" <[email protected]>
Newsgroups gmane.comp.web.canoo.webtest
Message-ID <C853E1E61B97314BA056081A405639350A454EFAC8@EX2.office.key-work.de>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.