I think we find the root of the problem: we discovered, that when you clean
your definitions.xml from all entities and start your tests, the first time
the test will fail because canoo cannot find the macros (although the
definitions.xml was filled correctly). If you start it a second time the
tests run.
Because we copy all the descibed files each time and generate the
definitions.xml anew, the test always fails.
Stefan Seger wrote:
>
> Hello,
>
> we have a sufficient number of test cases for our application written in
> canoo webtest. So far we've only tested the standard version of our
> application. But there are different customized version of it.
>
> Now we look for a solution to customize our test cases as well. Our
> approach is to create a "build_canoo" folder in our Canoo folder, where we
> copy all webtests, definitions and includes to. After that we copy and
> overwrite our adapted webtests, defintions and includes from our "version"
> folder into the "build_canoo" folder.
>
> That works so far. We also modified the following paths in the
> "build.xml":
>
> <property name="wt.generateDefinitions.dir"
> location="./build_canoo\definitions" description="the definitions dir"/>
> <property name="wt.generateDefinitions.file"
> location="./build_canoo\definitions.xml" description="the definitions file
> to generate"/>
>
> <property name="wt.generateDtd.entities.pattern"
> value="/build_canoo/includes/**/*.xml" description="how to identify the
> entities"/>
> <property name="wt.generateDtd.file"
> location="./build_canoo/dtd/Project.dtd" description="the dtd file to
> generate"/>
>
> <import file="${webtest.home}/webtest.xml" description="Import all
> functionalities for a full build"/>
> <import file="build_canoo\definitions.xml" description="Import custom
> definitions (if any)"/>
>
> <property name="wt.testInWork"
> value="build_canoo\TestSuiteAllLanguages.xml"/>
> <property name="wt.config.resultpath" location="build_canoo\results"/>
>
>
> When we start our test then no macro can be executed. The includes are
> working fine.
>
> Here's the trace:
>
> <PathToTest>\build_canoo\webtests\Initialize\createClients.xml:12:
> 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:379)
> at com.canoo.webtest.steps.Step.execute(Step.java:110)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> 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.execute(WebtestTask.java:206)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> 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(SingleCheckExecutor.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.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> 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(SingleCheckExecutor.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.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> 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(SingleCheckExecutor.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.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> 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.java: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:
> <PathToTest>\build_canoo\webtests\Initialize\createClients.xml:15:
> Problem: failed to create task or type createRisk
> Cause: The name is undefined.
> Action: Check the spelling.
> Action: Check that any custom tasks/types have been declared.
> Action: Check that any <presetdef>/<macrodef> declarations have taken
> place.
>
> at
> org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:481)
> at
> org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:413)
> at
> org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:160)
> at org.apache.tools.ant.Task.perform(Task.java:347)
> 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:101)
> ... 59 more
>
>
--
View this message in context:
http://www.nabble.com/Using-webtests-for-different-versions-of-our-application-tp20500624p20501563.html
Sent from the WebTest mailing list archive at Nabble.com.
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest