Hey, thanks for the help, but I reported already on Friday that I got it to work. I guess that message did not pass because it was over 40 kBytes. But I really appreciate the effort that you put in this.
David -----Original Message----- From: John Spann [mailto:john.sp...@citrix.com] Sent: maandag 16 maart 2009 18:47 To: webtest@lists.canoo.com; Marc Guillemot Cc: David Jehoul Subject: Re: [Webtest] sshexec seems not to work with Canoo ant Hi David, I had no problem getting the sshexec task working with Webtest. Do you have the sshexec jar in your classpath? You can go about this two ways. 1. Copy the required jars into ${webtest.home}/lib 2. Create a custom classpath in ant and load the sshexec task from there Because we do not want to customize the webtest installation process, we went with option 2. To do this, we created a folder local to our tests called lib and placed ant-jsch.jar and jsch-0.1.39.jar inside. Our build.xml has the following snippet: <!-- Define Custom Classpath --> <path id="custom.classpath"> <fileset dir="${basedir}/lib/" includes="**/*.jar"/> </path> <!-- sshexec ant task --> <taskdef name="sshexec" classname="org.apache.tools.ant.taskdefs.optional.ssh.SSHExec" classpathref="custom.classpath"/> I've also attached both jars, in case you need them. Hope that helps, John Spann | Associate Software Engineer Citrix Online Division Citrix Systems, Inc. 6500 Hollister Avenue Goleta, CA 93117 USA www.citrix.com Phone: 805.690.3489 Cell: 805.729.0008 Email: john.sp...@citrix.com On 3/16/09 7:33 AM, "Marc Guillemot" <mguille...@yahoo.fr> wrote: Hi, I don't see any reason why WebTest could interact with sshexec. Does really this sshexec command work outside <webtest> </webtest>? Cheers, Marc. -- Web: http://www.efficient-webtesting.com Blog: http://mguillem.wordpress.com David Jehoul wrote: > Hi, > > > > In one of our testscript, we use the following ant sshexec command > > <sshexec > > host="172.21.0.132" > > username="username" > > password="pasword" > > trust="yes" > > command="/opt/ResinexHome/AutomaticBooker/exec/startAutoBooker_testmode.sh" > > /> > > > > When we use the apache ant, the command is executed. When using the > Canoo ant, it does not execute. > > We use build 1757 of Canoo webtest. > > > > Here is the stacktrace: > > > > > > c:\testScripts\BT09-01.xml:17: Unexpected exception caught: org.apache.tools.ant.BuildException > > at com.canoo.webtest.steps.StepUtil.handleException(StepUtil.java:120) > > at com.canoo.webtest.steps.Step.handleException(Step.java:387) > > at com.canoo.webtest.steps.Step.execute(Step.java:118) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > at org.apache.tools.ant.Task.perform(Task.java:348) > > at com.canoo.webtest.ant.WebtestTask.executeSteps(WebtestTask.java:236) > > at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:208) > > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > at org.apache.tools.ant.Task.perform(Task.java:348) > > at org.apache.tools.ant.Target.execute(Target.java:357) > > at org.apache.tools.ant.Target.performTasks(Target.java:385) > > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > > at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx ecutor.java:38) > > at org.apache.tools.ant.Project.executeTargets(Project.java:1181) > > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) > > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > at org.apache.tools.ant.Task.perform(Task.java:348) > > at org.apache.tools.ant.Target.execute(Target.java:357) > > at org.apache.tools.ant.Target.performTasks(Target.java:385) > > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > > at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx ecutor.java:38) > > at org.apache.tools.ant.Project.executeTargets(Project.java:1181) > > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) > > at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105) > > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > at org.apache.tools.ant.Task.perform(Task.java:348) > > at org.apache.tools.ant.Target.execute(Target.java:357) > > at org.apache.tools.ant.Target.performTasks(Target.java:385) > > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > > at org.apache.tools.ant.Project.executeTarget(Project.java:1298) > > at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j ava:41) > > at org.apache.tools.ant.Project.executeTargets(Project.java:1181) > > at org.apache.tools.ant.Main.runBuild(Main.java:698) > > at org.apache.tools.ant.Main.startAnt(Main.java:199) > > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) > > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) > > Caused by: c:\testScripts\generateDAT.xml:112: Remote command failed with exit status 2 > > at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(SSHExec.java:192) > > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > at org.apache.tools.ant.Task.perform(Task.java:348) > > at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43 ) > > at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31) > > at com.canoo.webtest.steps.Step.execute(Step.java:103) > > ... 50 more > > --- Nested Exception --- > > c:\testScripts\generateDAT.xml:112: Remote command failed with exit status 2 > > at org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(SSHExec.java:192) > > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > at org.apache.tools.ant.Task.perform(Task.java:348) > > at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43 ) > > at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31) > > at com.canoo.webtest.steps.Step.execute(Step.java:103) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > at org.apache.tools.ant.Task.perform(Task.java:348) > > at com.canoo.webtest.ant.WebtestTask.executeSteps(WebtestTask.java:236) > > at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:208) > > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > at org.apache.tools.ant.Task.perform(Task.java:348) > > at org.apache.tools.ant.Target.execute(Target.java:357) > > at org.apache.tools.ant.Target.performTasks(Target.java:385) > > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > > at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx ecutor.java:38) > > at org.apache.tools.ant.Project.executeTargets(Project.java:1181) > > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) > > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > at org.apache.tools.ant.Task.perform(Task.java:348) > > at org.apache.tools.ant.Target.execute(Target.java:357) > > at org.apache.tools.ant.Target.performTasks(Target.java:385) > > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > > at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckEx ecutor.java:38) > > at org.apache.tools.ant.Project.executeTargets(Project.java:1181) > > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416) > > at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105) > > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) > > at org.apache.tools.ant.Task.perform(Task.java:348) > > at org.apache.tools.ant.Target.execute(Target.java:357) > > at org.apache.tools.ant.Target.performTasks(Target.java:385) > > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > > at org.apache.tools.ant.Project.executeTarget(Project.java:1298) > > at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j ava:41) > > at org.apache.tools.ant.Project.executeTargets(Project.java:1181) > > at org.apache.tools.ant.Main.runBuild(Main.java:698) > > at org.apache.tools.ant.Main.startAnt(Main.java:199) > > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) > > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) > > > > <file:///c:\testScripts\testOutput\20090312_105321\index.html> > _______________________________________________ WebTest mailing list WebTest@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest _______________________________________________ WebTest mailing list WebTest@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest