[Webtest] HTTPS works with webtest 1.6 (build 543) but not with 1.7 (build 763)

Dierk Koenig webtest@lists.canoo.com
Thu, 14 Apr 2005 14:12:02 +0200


Can you please provide the console output of the failed connection attempt.
It would also be profitable to enable logging (lib/log4j.properties).

cheers
Mittie

> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Richard Sullivan
> Sent: Donnerstag, 14. April 2005 11:12
> To: webtest@lists.canoo.com
> Subject: [Webtest] HTTPS works with webtest 1.6 (build 543) but not with
> 1.7 (build 763)
>
>
> Hi,
>
> I am trying to upgrade from webtest 1.6 (build 543) to 1.7.  The
> problem is that with all newer releases than build 543 I have
> problems connecting via HTTPS.  My test weblogic 8.1 server
> listens on 7041 (HTTP) and 7042 (HTTPS).  I have javascript
> problems with build 543 and cannot change the HTML so I am hoping
> that the upgrade will solve my problems!
>
> I change the "webtest.home" parameter in the script to point to
> different webtest releases but apart from that the script is
> unchanged between runs.
>
> I am running jdk 1.4.2.
>
> Any ideas ?
> Thanks,
> Richard
>
> <project name="InstallationCheck" basedir="." default="all">
> <!--
>    To use HTTPS (see
> http://webtest.canoo.com/webtest/samples/ssl/howto.txt )
>    ============
>    0. work with a JDK (not JRE) version 1.4 or higher.  Check that
>       JAVA_HOME points to this jdk.
>
>    1. Make sure the site you want to test runs OK with https in
> the webbrowser
>       (yes in the future this checking will be done automatically ;=)
>
>    2. Open a browser and go to the site you wish to test. Export
> the certificate
>       into a file. For internet explorer using an untrusted
> certificate do this
>       as follows:
>       a. enter the "https" url
>       b. choose "view certificate"->"details"->"copy to file"
>       c. for the example save it to c:\temp\myApp.cer
>
>    3. Import the site certificate in the "cacerts" keystore in
> order to "trust"
>       the site you want to test against. E.g.:
>       %JAVA_HOME%\bin\keytool -keystore
> %JAVA_HOME%\jre\lib\security\cacerts -import -file
> c:\temp\myApp.cer -alias myApp
>       (The initial password for the keystore in JSSE 1.0.2 is "changeit").
>
>    4. If you imported the certificate to a different keystore than in the
>       example be sure to modify the "webtest.truststore.file"
> property in the
>       ant script.
>
>    -->
>     <!-- must point to the directory containing
> "webtestTaskdefs.properties" -->
>     <property name="webtest.home"
> value="D:\richard\apps\java_apps\test_tools\canoo_webtest_1.7_R_763"/>
>
>     <property name="webtest.input.newGrantApplication.callNumber"
> value="017"/>
>     <property name="webtest.input.newGrantApplication.callYear"
> value="2004"/>
>     <property name="webtest.input.newGrantApplication.email"
> value="testemail@testaddress.tst"/>
>
>
>     <property name="base.dir" value="${basedir}"/>
>     <property environment="env"/>
>     <property name="webtest.connectioninitializer"
>
> value="com.canoo.webtest.security.SunJsseBaseConnectionInitializer"/>
>     <property name="webtest.truststore.file"
> value="${env.JAVA_HOME}\jre\lib\security\cacerts" />
>     <target name="all" depends="mayPrintANTError,
> continueWebTestUsingHTTPS"/>
>
>     <target name="continueWebTestUsingHTTPS">
>         <testSpec name="create new grant application via https">
>             <config
>                 host="localhost"
>                 port="7042"
>                 protocol="https"
>                 basepath="comm/employment_social/swim"
>                 saveresponse="true"
>                 showhtmlparseroutput="true"
>             />
>             <steps>
>                 <invoke
>                     stepid="get welcome Page again via https"
>                     url="displayWelcome.do"
>                 />
>
>                 <clicklink
>                     stepid="click on link 'create new grant application'"
>                     href="dspCreateLogin.do"
>                 />
>
>                 <verifyelement
>                     stepid="Check page containing new grant form
> was returned"
>                     type="INPUT"
>                     text="cmdCreateLogin"
>                 />
>             </steps>
>         </testSpec>
>     </target>
>
>     <target name="checkANT">
>         <available classname="org.apache.tools.ant.ProjectComponent"
>             property="ant.version.ok"/>
>     </target>
>
>     <target name="mayPrintANTError" unless="ant.version.ok"
> depends="checkANT">
>         <echo message="You have a non-compliant version of ANT"/>
>         <echo message="Consider moving WEBTESTHOME/lib/ant.jar"/>
>         <echo message="to ANT_HOME/lib."/>
>     </target>
>
>     <taskdef file="${webtest.home}/webtestTaskdefs.properties">
>         <classpath>
>             <pathelement path="${webtest.home}/lib"/>
>             <!--fileset dir="${webtest.home}"
> includes="deploy/clover/*.jar"/ -->
>             <fileset dir="${webtest.home}" includes="lib/*.jar"/>
>             <fileset dir="${webtest.home}" includes="lib/base/*.jar"/>
>             <fileset dir="${webtest.home}" includes="lib/optional/*.jar"/>
>         </classpath>
>     </taskdef>
>
> </project>
>
>
>
> ------------------------------------------------------------------
> -----------------------------------------------------------------------
>
> java version "1.4.2_07"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)
> Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)
> --------------------------------------------------------  Output
> using 1.7_R_763  ------------------------------------------
>
> Buildfile: testSwim-new-webtest.xml
> Trying to override old definition of task sleep
>
> checkANT:
>
> mayPrintANTError:
>
> continueWebTestUsingHTTPS:
>  [testSpec]  INFO (com.canoo.webtest.steps.Step) - Start Step:
> null "[implict setup step]" (1/5)
>  [testSpec]  INFO (com.canoo.webtest.steps.Setup) - Surfing with
> browser Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)
>  [testSpec]  INFO (com.canoo.webtest.steps.Step) - Start Step:
> invoke "get welcome Page again via https" (2/5)
>  [testSpec]  INFO (com.canoo.webtest.steps.request.Target) - ->
> gotoTarget(by url):
> https://localhost:7042/comm/employment_social/swim/displayWelcome.
> do
>  [testSpec]  INFO (com.canoo.webtest.steps.request.Target) - Root
> exception from Connection Initializer
>  [testSpec] java.lang.NullPointerException
>  [testSpec]     at java.util.Hashtable.put(Hashtable.java:393)
>  [testSpec]     at java.util.Properties.setProperty(Properties.java:102)
>  [testSpec]     at java.lang.System.setProperty(System.java:656)
>  [testSpec]     at
> com.canoo.webtest.security.AbstractConnectionInitializer.setSystem
> Property(AbstractConnectionInitializer.java:92)
>  [testSpec]     at
> com.canoo.webtest.security.SunJsseBaseConnectionInitializer.initia
> lizeConnection(SunJsseBaseConnectionInitializer.java:39)
>  [testSpec]     at
> com.canoo.webtest.steps.request.Target.invokeCustomInitializer(Tar
> get.java:232)
>  [testSpec]     at
> com.canoo.webtest.steps.request.Target.prepareConversationIfNeeded
> (Target.java:186)
>  [testSpec]     at
> com.canoo.webtest.steps.request.Target.getResponse(Target.java:156)
>  [testSpec]     at
> com.canoo.webtest.steps.request.Target$1.call(Target.java:144)
>  [testSpec]     at
> com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:94)
>  [testSpec]     at
> com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:140)
>  [testSpec]     at
> com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePage.java:42)
>  [testSpec]     at com.canoo.webtest.steps.Step.execute(Step.java:138)
>  [testSpec]     at
> com.canoo.webtest.engine.Engine.executeSteps(Engine.java:31)
>  [testSpec]     at
> com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificat
> ionTask.java:80)
>  [testSpec]     at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>  [testSpec]     at org.apache.tools.ant.Task.perform(Task.java:364)
>  [testSpec]     at org.apache.tools.ant.Target.execute(Target.java:341)
>  [testSpec]     at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
>  [testSpec]     at
> org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>  [testSpec]     at
> org.apache.tools.ant.Project.executeTargets(Project.java:1062)
>  [testSpec]     at org.apache.tools.ant.Main.runBuild(Main.java:673)
>  [testSpec]     at org.apache.tools.ant.Main.startAnt(Main.java:188)
>  [testSpec]     at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>  [testSpec]     at
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
>  [testSpec]  INFO (com.canoo.webtest.steps.Step) - Exception
> thrown from this class: com.canoo.webtest.engine.StepExecutionException
>  [testSpec]  INFO (com.canoo.webtest.steps.Step) - Message was:
> Exception raised while trying to create custom
> ConnectionInitializer <com.canoo.webtes
> t.security.SunJsseBaseConnectionInitializer> / Exception:
> java.lang.NullPointerException
>  [testSpec]  INFO (com.canoo.webtest.steps.Step) - Exception
> thrown from this class: com.canoo.webtest.engine.StepExecutionException
>  [testSpec]  INFO (com.canoo.webtest.steps.Step) - Message was:
> Exception raised while trying to create custom
> ConnectionInitializer <com.canoo.webtes
> t.security.SunJsseBaseConnectionInitializer> / Exception:
> java.lang.NullPointerException
>
> BUILD FAILED
> D:\richard\eclipse-workspace\testSwim\testSwim-new-webtest.xml:44:
>  Test failed.
> Exception raised:
> com.canoo.webtest.engine.StepExecutionException: Exception raised
> while trying to create custom ConnectionInitializer <com.canoo.web
> test.security.SunJsseBaseConnectionInitializer> / Exception:
> java.lang.NullPointerException, Step: InvokePage at
> D:\richard\eclipse-workspace\testSwim
> \testSwim-new-webtest.xml:57:  with (stepId="get welcome Page
> again via https", url="displayWelcome.do",
> stepType="invoke")com.canoo.webtest.engine.St
> epExecutionException: Exception raised while trying to create
> custom ConnectionInitializer
> <com.canoo.webtest.security.SunJsseBaseConnectionInitialize
> r> / Exception: java.lang.NullPointerException, Step: InvokePage
> at
> D:\richard\eclipse-workspace\testSwim\testSwim-new-webtest.xml:57:
>   with (stepId="
> get welcome Page again via https", url="displayWelcome.do",
> stepType="invoke")
>         at
> com.canoo.webtest.steps.request.Target.invokeCustomInitializer(Tar
> get.java:240)
>         at
> com.canoo.webtest.steps.request.Target.prepareConversationIfNeeded
> (Target.java:186)
>         at
> com.canoo.webtest.steps.request.Target.getResponse(Target.java:156)
>         at com.canoo.webtest.steps.request.Target$1.call(Target.java:144)
>         at
> com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:94)
>         at
> com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:140)
>         at
> com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePage.java:42)
>         at com.canoo.webtest.steps.Step.execute(Step.java:138)
>         at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:31)
>         at
> com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificat
> ionTask.java:80)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
>         at org.apache.tools.ant.Main.runBuild(Main.java:673)
>         at org.apache.tools.ant.Main.startAnt(Main.java:188)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
>
>
> Total time: 4 seconds
> D:\richard\eclipse-workspace\testSwim>
>
>
> --------------------------------------------------------  Now
> using build.number=543 ------------------------------------------
>
> D:\richard\eclipse-workspace\testSwim>Y:\GeneralTools\pre-configur
> ed\installations\ant\bin\ant.bat -f testSwim-new-webtest.xml
> Buildfile: testSwim-new-webtest.xml
> Trying to override old definition of task sleep
>
> checkANT:
>
> mayPrintANTError:
>
> continueWebTestUsingHTTPS:
>  [testSpec]  INFO (Step.java:233) - Start Step: null "[implict
> setup step]" (1/5)
>  [testSpec]  INFO (Step.java:233) - Start Step: invoke "get
> welcome Page again via https" (2/5)
>  [testSpec]  INFO (Target.java:144) - -> gotoTarget(by url):
> https://localhost:7042/comm/employment_social/swim/displayWelcome.do
>  [testSpec]  INFO (SunJsseBaseConnectionInitializer.java:77) -
> Installing HostnameVerifier
>  [testSpec]  INFO (SunJsseBaseConnectionInitializer.java:80) -
> Granting access for localhost
>  [testSpec]  INFO (Context.java:186) - Current form set to none
>  [testSpec]  INFO (Step.java:233) - Start Step: clicklink "click
> on link 'create new grant application'" (3/5)
>  [testSpec]  INFO (SunJsseBaseConnectionInitializer.java:80) -
> Granting access for localhost
>  [testSpec]  INFO (Context.java:186) - Current form set to none
>  [testSpec]  INFO (Step.java:233) - Start Step: verifyelement
> "Check page containing new grant form was returned" (4/5)
>  [testSpec]  INFO (Step.java:233) - Start Step: null "[implicit
> tear down step]" (5/5)
>
> all:
>
> BUILD SUCCESSFUL
> Total time: 14 seconds
> D:\richard\eclipse-workspace\testSwim>
>
> ______________________________________________________________
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>