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