If you are using httpunit to automate your website testing and your site is on secure domain (i.e. on https); httpunit would not be able to access your site unless you add below code in your tests(probably in setup() method)
//code to make test case run for HTTPS site com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.setDefaultHostnameVerifier(new com.sun.net.ssl.HostnameVerifier()
{
public boolean verify(String urlHostname, String certHostname)
{
return true;
}
}
);
Saturday, September 20, 2008
How to access secure website (https) in HTTPUNIT
Subscribe to:
Post Comments (Atom)
2 comments:
This one is for jdk 1.4. Now replace for javax.net.sss.HttpsURLConnection
Thanks OliuDaria !
Post a Comment