[Webtest] implementing a new step

webtest@lists.canoo.com webtest@lists.canoo.com
Tue, 27 Apr 2004 15:51:00 -0700


Hi Aatish, thanks for the reponse and the brain power.   But lucky for =
me
(because I must be finally thinking correctly) that is exactly how I =
have
it.  But not lucky for Canoo (it still doesn't work).

I have tracked the error message coming from TestStepSequence (public =
void
addTask(Task task)), and so I added my IfStep as a task (noting how =
other
custom steps did it), but to no avail.  The code I added was:=20

else if (task instanceof IfStep) {
			step =3D new IfWrapper((IStepSequence) task);

Which is what the repeat step and not step and group step do, but I am =
still
not quite getting it.

Thanks again for the advice,
Jeannie

-----Original Message-----
From: Aatish Arora [mailto:a_aatish@yahoo.com]
Sent: Monday, April 26, 2004 9:32 AM
To: webtest@lists.canoo.com
Subject: RE: [Webtest] implementing a new step


Hi Jeannie,

How about just the package def as:
package com.canoo.webtest.extension;

(the first line in the code)

....and the class definations as:

1) public class IfWrapper extends StepContainer
=20
---> for IfWrapper.java


2) and public class IfStep extends TestStepSequence
---> for IfStep?

cheers!
Aatish

PS: im no java programmer...so bear with me :)

--- Jeannie Graham <Jgraham@arrowheadgrp.com> wrote:
> Hi Aatish,
>=20
> 	That didn't seem to work, I got two compile errors
> from it:
>=20
> [javac]
>
C:\WEBTESTHOME\src\com\canoo\webtest\extension\IfStep.java:16:
> com.canoo.webtest.extension.IfStep is not abstract
> and does not override
> abstract method
> doExecute(com.canoo.webtest.engine.Context) in
> com.canoo.webtest.steps.Step  [javac] public class
> IfStep extends Step
>=20
> [javac]
> C:\WEBTESTHOME\src\com\canoo\webtest\extension
> IfWrapper.java:91:
> cannot resolve symbol
>     [javac] symbol  : method getSteps ()
>     [javac] location: class
> com.canoo.webtest.extension.IfStep
>     [javac] for (Iterator iter =3D
> getIfStep().getSteps().iterator();
> iter.hasNext();)
>=20
> but you were right about the "extends
> TestStepSequence".
>=20
> -----Original Message-----
> From: Aatish Arora [mailto:a_aatish@yahoo.com]
> Sent: Wednesday, April 21, 2004 11:29 PM
> To: webtest@lists.canoo.com
> Subject: Re: [Webtest] implementing a new step
>=20
>=20
> Jeannie,
>=20
> In IfStep.java ...is the class defination like:
>=20
> public class IfStep extends TestStepSequence
>=20
> ?????
>=20
> If yes then try changing it to=20
>=20
> public class IfStep extends Step
>=20
> ???
>=20
> Hope it works!
>=20
> cheers!
> Aatish
>=20
>=20
> LabelTestStepSpecification
>=20
> --- Jeannie Graham <Jgraham@arrowheadgrp.com> wrote:
> > Hello group,
> >=20
> > I received the IF statement patch (thanks to
> Aatish)
> > and I finally got past
> > all the compile errors and when I actually tried
> to
> > use it, I got this
> > error.
> >=20
> > BUILD FAILED
> > Task must be of type "Step": iF at
> > file:D:/canootest/Scratch/violations.xml:5:
> > is of type com.canoo.webtest.extension.IfStep
> >=20
> > I tracked down that error message located in
> > TestStepSequence, and I had
> > added this snippet of code, hoping to remedy it,
> but
> > it didn't:
> >=20
> >  public void addIf( IfStep ifstep){
> > 		IfWrapper step =3D new IfWrapper(ifstep);
> > 		step.setStepType("if");
> > 		addStep(step);
> > 	}
> >=20
> > And I had added
> > "iF=3Dcom.canoo.webtest.extension.IfStep" to the
> > webtestTaskdefs property file.
> >=20
> > So, any ideas on what I'm doing wrong?
> >=20
> > Thanks,
> > Jeannie
> >=20
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
>=20
>=20
>=20
> =09
> 	=09
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25=A2
> http://photos.yahoo.com/ph/print_splash
> _______________________________________________
> 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



=09
	=09
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25=A2
http://photos.yahoo.com/ph/print_splash
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest