Hi Stepahn
Marc will correct me if I'm wrong ;-)
WebTest steps are not (yet??) ant tasks.
They have a more elaborate life cycle and other hooks.
I think that there is a template to write new steps, appropriately
called MyCustomStep, in the doc.zip available at <http://
webtest.canoo.com/webtest/doc.zip>, as well as in the release
directories.
Happy testing
dna
On 13 sept. 06, at 20:44, Stefan Kuhn wrote:
I've got some problems developing my own Webtest Task. In fact I
can't even get an empty-class extending a already finished Webtest-
class(like StorePropertyStep) to work.
My ANT Script looks like following:
<target name="test3">
<taskdef name="mytask" classname="javaTestSupport.CommonTasks
$AntTest" classpathref="classpath"/>
<webtest ...>
<config .../>
<steps>
<mytask />
</steps>
</webtest>
</target>
Following the ANT manual apache-ant-1.6.5/docs/manual/
develop.html#writingowntask
following code is working :
public class CommonTasks {
public static class AntTest extends Echo {}
}
BUT if I now extend any Webtest Class, like:
public static class AntTest extends StorePropertyStep {}
I get an exception:
INFO (com.canoo.webtest.steps.Step) - Message was:
java.lang.NullPointerException
ERROR (com.canoo.webtest.steps.Step) - Cannot handle unexpected
exception in step TestStepSequence at C:\...justATest.webtest.xml:
31: with (taskName="steps")
C:\...\justATest.webtest.xml:42: java.lang.NullPointerException
at org.apache.tools.ant.Task.perform(Task.java:373)
at com.canoo.webtest.ant.TestStepSequence.executeSteps
(TestStepSequence.java:43)
at com.canoo.webtest.ant.TestStepSequence.doExecute
(TestStepSequence.java:31)
How can I write my own Webtest Tasks?
Sincerly,
Stefan
--
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
--
Optimization without evidence is merely hoping.
- G. Guerin
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest