[Webtest] Adding jar files to WebTest classpath

Denis N. Antonioli Denis N. Antonioli" <denis.antonioli@canoo.com
Fri, 25 May 2007 09:22:17 +0200


--Apple-Mail-1--92925109
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=ISO-8859-1;
	delsp=yes;
	format=flowed

Hi

the AppletRunnerStep fetches the applet from the server, like the =20
browser does, so you have nothing special to do.

I see that the applet has a https url.
Is the applet signed?
This was a problem at least once in a previous project, but we could =20
then switch to an unsigned applet for testing.

Best
	dna

On 25 mai 07, at 01:18, Rich Toulouse wrote:

> Hi there
> I'm trying to test an applet and I keep getting a =20
> ClassNotFoundException.  I am wondering how I add the jar =20
> containing the applet to the classpath when I run WebTest.  I'm =20
> assuming that this is a classpath issue.  I've been searching the =20
> docs and email archive, but haven't found anything.  Is there a way =20=

> to set this in the build script or an external properties file?
>
> Here's the logging that I see:
>
> [appletRunner]  INFO (com.canoo.webtest.steps.Step) - >>>> Start =20
> Step: appletRunner (2/3)
> [appletRunner]  INFO =20
> (com.canoo.webtest.steps.request.AbstractTargetAction) - -> =20
> gotoTarget by applet showDocument
> [appletRunner]  INFO =20
> (com.canoo.webtest.extension.applet.AppletRunnerStep) - Executing =20
> 'C:\Program Files\Java\jdk1.6.0_01\jre\bin\java.exe' with arguments:
> [appletRunner] '-Dlog4j.configuration=3Dfile:/C:/WebTest/bin/../lib/=20=

> log4j.properties'
> [appletRunner] '-Dlog4j.defaultInitOverride=3Dfalse'
> [appletRunner] '-=20
> Djava.protocol.handler.pkgs=3Dcom.canoo.webtest.extension.applet.runner'=

> [appletRunner] '-classpath'
> [appletRunner] 'C:\WebTest\bin\..\lib\commons-logging-1.1.jar;C:=20
> \WebTest\bin\..\lib\commons-httpclient-3.0.1.jar;C:\WebTest\bin\..=20
> \lib\log4j-1.2.14.jar;C:\WebTest\bin\..\lib\ant-1.6.5.jar;C:\WebTest=20=

> \bin\..\lib\htmlunit-1.11.jar;C:\WebTest\bin\..\lib\commons-=20
> codec-1.3.jar;C:\WebTest\bin\..\lib\jemmy-20040604.jar;C:\WebTest=20
> \bin\..\lib\webtest.jar'
> [appletRunner] =20
> 'com.canoo.webtest.extension.applet.runner.AppletRunner'
> [appletRunner] 'C:\DOCUME~1\RichT\LOCALS~1\Temp=20
> \AppletPlugin63522.arguments'
>
> [appletRunner] The ' characters around the executable and arguments =20=

> are
> [appletRunner] not part of the command.
>
> [appletRunner] Using =20
> org.netbeans.jemmy.drivers.DefaultDriverInstaller driver installer
> [appletRunner]  INFO =20
> (com.canoo.webtest.extension.applet.AbstractAppletTag) - https://=20
> rich.attachmate.com/rweb/ex/Launcher.jar
> [appletRunner] ERROR =20
> (com.canoo.webtest.extension.applet.runner.AppletRunner) - com/wrq/=20
> rweb/Launcher
> [appletRunner] java.lang.ClassNotFoundException: com/wrq/rweb/Launcher
> [appletRunner]  at java.lang.Class.forName0(Native Method)
> [appletRunner]  at java.lang.Class.forName(Class.java:247)
> [appletRunner]  at =20
> com.canoo.webtest.extension.applet.runner.AppletRunner.createObject=20
> (AppletRunner.java:145)
> [appletRunner]  at =20
> com.canoo.webtest.extension.applet.runner.AppletRunner.newApplet=20
> (AppletRunner.java:137)
> [appletRunner]  at =20
> com.canoo.webtest.extension.applet.runner.AppletRunner.run=20
> (AppletRunner.java:81)
> [appletRunner]  at =20
> com.canoo.webtest.extension.applet.runner.AppletRunner.main=20
> (AppletRunner.java:62)
> [appletRunner]  INFO =20
> (com.canoo.webtest.extension.applet.AppletRunnerStep) - runApplet: =20
> exitValue was: -3
> [appletRunner] ERROR =20
> (com.canoo.webtest.extension.applet.AppletRunnerStep) - Test =20
> com.wrq.applet.test.AppletTest failed. Exit value: -3
>
--=20
Ce n'est point dans l'objet que r=E9side le sens des choses, mais dans =20=

la d=E9marche.
   -- Antoine de Saint-Exup=E9ry, Citadelle



--Apple-Mail-1--92925109
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; ">Hi<DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>the AppletRunnerStep =
fetches the applet from the server, like the browser does, so you have =
nothing special to do.</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>I see that the applet has a =
https url.</DIV><DIV>Is the applet signed?</DIV><DIV>This was a problem =
at least once in a previous project, but we could then switch to an =
unsigned applet for testing.</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>Best</DIV><DIV><SPAN =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</SPAN>dna</DIV><DIV><BR><DIV><DIV>On 25 mai 07, at 01:18, Rich Toulouse =
wrote:</DIV><BR class=3D"Apple-interchange-newline"><BLOCKQUOTE =
type=3D"cite">  <DIV><SPAN class=3D"701523622-24052007"><FONT =
face=3D"Arial" size=3D"2">Hi there</FONT></SPAN></DIV> <DIV><SPAN =
class=3D"701523622-24052007"><FONT face=3D"Arial" size=3D"2">I'm trying =
to test an applet and I keep getting a ClassNotFoundException.=A0 I am =
wondering how I add the jar containing the applet to the classpath when =
I run WebTest.=A0 I'm assuming that this is a classpath issue.=A0 I've =
been searching the docs and email archive, but haven't found anything.=A0 =
Is there a way to set this in the build script or an external properties =
file?</FONT></SPAN></DIV> <DIV><SPAN class=3D"701523622-24052007"><FONT =
face=3D"Arial" size=3D"2"></FONT></SPAN>=A0</DIV> <DIV><SPAN =
class=3D"701523622-24052007"><FONT face=3D"Arial" size=3D"2">Here's the =
logging that I see:</FONT></SPAN></DIV> <DIV><SPAN =
class=3D"701523622-24052007"><FONT face=3D"Arial" =
size=3D"2"></FONT></SPAN>=A0</DIV> <DIV><SPAN =
class=3D"701523622-24052007"><FONT face=3D"Arial" =
size=3D"2">[appletRunner]=A0 INFO (com.canoo.webtest.steps.Step) - =
&gt;&gt;&gt;&gt; Start Step: appletRunner (2/3)<BR>[appletRunner]=A0 =
INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - -&gt; =
gotoTarget by applet showDocument<BR>[appletRunner]=A0 INFO =
(com.canoo.webtest.extension.applet.AppletRunnerStep) - Executing =
'C:\Program Files\Java\jdk1.6.0_01\jre\bin\java.exe' with =
arguments:<BR>[appletRunner] '-Dlog4j.configuration=3D<A =
href=3D"file:/C">file:/C</A>:/WebTest/bin/../lib/log4j.properties'<BR>[app=
letRunner] '-Dlog4j.defaultInitOverride=3Dfalse'<BR>[appletRunner] =
'-Djava.protocol.handler.pkgs=3Dcom.canoo.webtest.extension.applet.runner'=
<BR>[appletRunner] '-classpath'<BR>[appletRunner] =
'C:\WebTest\bin\..\lib\commons-logging-1.1.jar;C:\WebTest\bin\..\lib\commo=
ns-httpclient-3.0.1.jar;C:\WebTest\bin\..\lib\log4j-1.2.14.jar;C:\WebTest\=
bin\..\lib\ant-1.6.5.jar;C:\WebTest\bin\..\lib\htmlunit-1.11.jar;C:\WebTes=
t\bin\..\lib\commons-codec-1.3.jar;C:\WebTest\bin\..\lib\jemmy-20040604.ja=
r;C:\WebTest\bin\..\lib\webtest.jar'<BR>[appletRunner] =
'com.canoo.webtest.extension.applet.runner.AppletRunner'<BR>[appletRunner]=
 =
'C:\DOCUME~1\RichT\LOCALS~1\Temp\AppletPlugin63522.arguments'</FONT></SPAN=
></DIV> <DIV>=A0</DIV> <DIV><SPAN class=3D"701523622-24052007"><FONT =
face=3D"Arial" size=3D"2">[appletRunner] The ' characters around the =
executable and arguments are<BR>[appletRunner] not part of the =
command.</FONT></SPAN></DIV> <DIV>=A0</DIV> <DIV><SPAN =
class=3D"701523622-24052007"><FONT face=3D"Arial" =
size=3D"2">[appletRunner] Using =
org.netbeans.jemmy.drivers.DefaultDriverInstaller driver =
installer<BR>[appletRunner]=A0 INFO =
(com.canoo.webtest.extension.applet.AbstractAppletTag) - <A =
href=3D"https://rich.attachmate.com/rweb/ex/Launcher.jar">https://rich.att=
achmate.com/rweb/ex/Launcher.jar</A><BR>[appletRunner] ERROR =
(com.canoo.webtest.extension.applet.runner.AppletRunner) - =
com/wrq/rweb/Launcher<BR>[appletRunner] =
java.lang.ClassNotFoundException: =
com/wrq/rweb/Launcher<BR>[appletRunner]=A0 at =
java.lang.Class.forName0(Native Method)<BR>[appletRunner]=A0 at =
java.lang.Class.forName(Class.java:247)<BR>[appletRunner]=A0 at =
com.canoo.webtest.extension.applet.runner.AppletRunner.createObject(Applet=
Runner.java:145)<BR>[appletRunner]=A0 at =
com.canoo.webtest.extension.applet.runner.AppletRunner.newApplet(AppletRun=
ner.java:137)<BR>[appletRunner]=A0 at =
com.canoo.webtest.extension.applet.runner.AppletRunner.run(AppletRunner.ja=
va:81)<BR>[appletRunner]=A0 at =
com.canoo.webtest.extension.applet.runner.AppletRunner.main(AppletRunner.j=
ava:62)<BR>[appletRunner]=A0 INFO =
(com.canoo.webtest.extension.applet.AppletRunnerStep) - runApplet: =
exitValue was: -3<BR>[appletRunner] ERROR =
(com.canoo.webtest.extension.applet.AppletRunnerStep) - Test =
com.wrq.applet.test.AppletTest failed. Exit value: -3<BR><BR =
class=3D"khtml-block-placeholder"></FONT></SPAN></DIV></BLOCKQUOTE></DIV><=
DIV> <SPAN class=3D"Apple-style-span" style=3D"border-collapse: =
separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: =
0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; =
"><DIV>--=A0</DIV><DIV>Ce n'est point dans l'objet que r=E9side le sens =
des choses, mais dans la d=E9marche.</DIV><DIV>=A0 -- Antoine de =
Saint-Exup=E9ry, Citadelle</DIV><BR =
class=3D"Apple-interchange-newline"></SPAN></SPAN> =
</DIV><BR></DIV></BODY></HTML>=

--Apple-Mail-1--92925109--