Hey Marc,

Thanks for the quick reply. I did manage to get it working by editing the
webtest.taskdef  file inside the webtest.jar. But I do agree with you that
this does make upgrading a bit more complicated. I'm going to give your
solution a try, it seems to make a lot more sense than mine from what I can
grasp initially.

Again thank you for your time, this was very helpful for me!

-Mark

On Thu, Mar 6, 2008 at 10:17 AM, Marc Guillemot <[EMAIL PROTECTED]> wrote:

> don't wait so long before to ask! ;-)
>
> If you use webtest.xml, tasks are define in wt.defineTasks target and
> loaded from the webtest.taskdef resource which is located in the
> webtest.jar.
>
> I don't think that this is a good idea to put own stuff within webtest
> dir as this makes upgrades more complicated.
>
> I prefer to define custom steps in Groovy but you can do this in java
> too, for instance with something like
>
> <target name="wt.defineTasks.init" description="customized classpath">
>  <antcall target="wt.webtest.wt.defineTasks.init" inheritRefs="true"/>
>  <path id="wt.defineTasks.classpath.customPrepend">
>    <pathelement location="path/to/your/classes"/>
>  </path>
> </target>
>
> and then
> <taskdef name="myStep" classname="my.custom.step"
> loaderref="wt.defineTasks.loader"
> classpathref="wt.defineTasks.classpath.id"/>
> somewhere before the tests are run.
>
> Cheers,
> Marc.
> --
> Blog: http://mguillem.wordpress.com
>
>
> Mark Greene wrote:
> > I've been trying to create my own custom step with little success. I
> > jared up a simple class that extends the Step class and implements the
> > doExecute() method. I took that jar, put it in the WEBTEST_HOME/lib
> > directory and added an entry to the webtestTaskdefs.properties file.
> >
> > When I try to run the test I get the familiar ANT error:Could not create
> > task or type of type: verifyMyXPath
> >
> > After several hours I decided to just take the verifyText entry:
> > verifyText:com.canoo.webtest.steps.verify.VerifyText  and copy it but
> > rename the task def to:
> >
> > verifyMyText:com.canoo.webtest.steps.verify.VerifyText
> >
> > When I referenced this in my test file I got the same error. It appears
> > to me that whatever I put in the webtestTaskDefs.properties file isn't
> > being honored. I'm using the latest development build: R_1681.
> >
> > I was hoping someone could point out a fundamental step that I'm
> missing.
> >
> > Thanks in advance,
> > Mark
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

Reply via email to