[Webtest] [webtest][JIRA] Closed: (WT-135) NPE in

Marc Guillemot (JIRA) webtest@lists.canoo.com
Thu, 18 May 2006 22:00:41 +0200 (CEST)


     [ http://webtest-community.canoo.com/jira/browse/WT-135?page=all ]
     
Marc Guillemot closed WT-135:
-----------------------------

    Resolution: Invalid
     Assign To: Marc Guillemot

No information received

> NPE in
> ------
>
>          Key: WT-135
>          URL: http://webtest-community.canoo.com/jira/browse/WT-135
>      Project: WebTest
>         Type: Bug

>     Versions: 2.0
>  Environment: SUse Linux 10
> JDK 1.5.0
> Apache Ant version 1.6.5 
>     Reporter: Ivan Rancati
>     Assignee: Marc Guillemot
>  Attachments: add-product.xml
>
> This is similar to issue 133
> http://webtest-community.canoo.com/jira/browse/WT-133
> As the reporter says that has been verified fixed with build r_1118, I am opening a separate issue
> According to this post
> http://lists.canoo.com/pipermail/webtest/2003q1/000500.html
> calling steps which are contained in a separate target it should work, however I'm getting NullPointerExceptions in AntWrapper. This is with build r_1118, r_1120, r_1121
> The caller code looks like this
> <target name="createStandaloneNavigonProduct" depends="createProductData">
>     <webtest name="createStandaloneNavigonProduct" description="create
> standalone product for Navigon device">
>         &config;
>         <steps>
>             &login;
>             <clickElement htmlId="menu:menu:btn_addProduct"
> description="click on add product btn" />
> [.... omitted some steps for compactness ... ]
>             <verifytext text="${ap_productAddedNote2}"
> description="verify successful prod creation message 2" />
>             <antWrapper>
>                 <antcall target="findProductInList">
>                     <param name="productToFind"
> value="standalone-${standaloneNavigonPrefix}" />
>                 </antcall>
>             </antWrapper>
>         </steps>
>     </webtest>
> </target>
> (note: I have tried with and without <antWrapper>)
> This is the subtarget
> <target name="findProductInList" depends="createProductData">
>     <!-- this target will never be called on its own -->
>     <webtest name="findProductInList" description="view all product list">
>         <steps>
>             <clickElement htmlId="menu:menu:btn_viewProduct"
> description="click on view product btn" />
>             <verifytitle text="${g_title}" description="verify browser
> title" />
>             <verifytext text="${title_viewProduct}" description="verify
> view product title" />
>             <!-- images, links, labels are verified by viewProductList -->
>             <verifytext text="${productToFind}" description="verifies
> that product: ${productToFind} is available in list" />
>         </steps>
>     </webtest>
> </target>
> (note: I have tried to omit webtest and steps, no difference)
>   [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
> verifytext "verify successful prod creation message 2" (28/30)
>   [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: null
> "<unknown>" (29/30)
>  INFO (com.canoo.webtest.steps.Step) - Exception thrown from this class:
> org.apache.tools.ant.BuildException
>  INFO (com.canoo.webtest.steps.Step) - Message was: The following error
> occurred while executing this line:
> /u/ivan/cvs/repository/internal/testing/mpuserdb/webtest/add-product.xml:10:
> java.lang.NullPointerException
> ERROR (com.canoo.webtest.steps.Step) - Cannot handle unexpected
> exception in step AntWrapper at  with (description="<unknown>")
> /u/ivan/cvs/repository/internal/testing/mpuserdb/webtest/add-product.xml:60:
> The following error occurred while executing this line:
> /u/ivan/cvs/repository/internal/testing/mpuserdb/webtest/add-product.xml:10:
> java.lang.NullPointerException
>         at
> org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:336)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at
> com.canoo.webtest.extension.AntWrapper.doExecute(AntWrapper.java:65)
>         at com.canoo.webtest.steps.Step.execute(Step.java:146)
>         at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:28)
>         at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:79)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>         at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>         at org.apache.tools.ant.Main.runBuild(Main.java:668)
>         at org.apache.tools.ant.Main.startAnt(Main.java:187)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> Caused by:
> /u/ivan/cvs/repository/internal/testing/mpuserdb/webtest/add-product.xml:10:
> java.lang.NullPointerException
>         at org.apache.tools.ant.Task.perform(Task.java:373)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at
> org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
>         at
> org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:334)
>         ... 18 more
> Caused by: java.lang.NullPointerException
>         at
> com.canoo.webtest.boundary.AntBoundary.maybeConfigure(AntBoundary.java:25)
>         at
> com.canoo.webtest.extension.AntWrapper.taskStarted(AntWrapper.java:120)
>         at org.apache.tools.ant.Project.fireTaskStarted(Project.java:1940)
>         at org.apache.tools.ant.Task.perform(Task.java:360)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at
> org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:131)
>         at
> org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:140)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         ... 22 more
> --- Nested Exception ---
> /u/ivan/cvs/repository/internal/testing/mpuserdb/webtest/add-product.xml:10:
> java.lang.NullPointerException
>         at org.apache.tools.ant.Task.perform(Task.java:373)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at
> org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
>         at
> org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:334)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at
> com.canoo.webtest.extension.AntWrapper.doExecute(AntWrapper.java:65)
>         at com.canoo.webtest.steps.Step.execute(Step.java:146)
>         at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:28)
>         at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:79)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>         at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>         at org.apache.tools.ant.Main.runBuild(Main.java:668)
>         at org.apache.tools.ant.Main.startAnt(Main.java:187)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> Caused by: java.lang.NullPointerException
>         at
> com.canoo.webtest.boundary.AntBoundary.maybeConfigure(AntBoundary.java:25)
>         at
> com.canoo.webtest.extension.AntWrapper.taskStarted(AntWrapper.java:120)
>         at org.apache.tools.ant.Project.fireTaskStarted(Project.java:1940)
>         at org.apache.tools.ant.Task.perform(Task.java:360)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at
> org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:131)
>         at
> org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:140)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         ... 22 more
> --- Nested Exception ---
> java.lang.NullPointerException
>         at
> com.canoo.webtest.boundary.AntBoundary.maybeConfigure(AntBoundary.java:25)
>         at
> com.canoo.webtest.extension.AntWrapper.taskStarted(AntWrapper.java:120)
>         at org.apache.tools.ant.Project.fireTaskStarted(Project.java:1940)
>         at org.apache.tools.ant.Task.perform(Task.java:360)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at
> org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:131)
>         at
> org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:140)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at
> org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
>         at
> org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:334)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at
> com.canoo.webtest.extension.AntWrapper.doExecute(AntWrapper.java:65)
>         at com.canoo.webtest.steps.Step.execute(Step.java:146)
>         at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:28)
>         at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:79)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>         at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>         at org.apache.tools.ant.Main.runBuild(Main.java:668)
>         at org.apache.tools.ant.Main.startAnt(Main.java:187)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
>  INFO (com.canoo.webtest.ant.WebtestTask) - Test report successfully
> created.
> BUILD FAILED
> /u/ivan/cvs/repository/internal/testing/mpuserdb/webtest/add-product.xml:37:
> Test failed.
> Exception raised: com.canoo.webtest.engine.StepExecutionException:
> Unexpected exception caught:
> /u/ivan/cvs/repository/internal/testing/mpuserdb/webtest/add-product.xml:60:
> The following error occurred while executing this line:
> /u/ivan/cvs/repository/internal/testing/mpuserdb/webtest/add-product.xml:10:
> java.lang.NullPointerException, Step: AntWrapper at  with
> (description="<unknown>")com.canoo.webtest.engine.StepExecutionException:
> Unexpected exception caught:
> /u/ivan/cvs/repository/internal/testing/mpuserdb/webtest/add-product.xml:60:
> The following error occurred while executing this line:
> /u/ivan/cvs/repository/internal/testing/mpuserdb/webtest/add-product.xml:10:
> java.lang.NullPointerException, Step: AntWrapper at  with
> (description="<unknown>")
>         at
> com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:573)
>         at com.canoo.webtest.steps.Step.execute(Step.java:149)
>         at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:28)
>         at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:79)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>         at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>         at org.apache.tools.ant.Main.runBuild(Main.java:668)
>         at org.apache.tools.ant.Main.startAnt(Main.java:187)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira