[Webtest] Null Pointer Exception with build 441

Akhil Raina webtest@lists.canoo.com
Fri, 28 May 2004 18:56:41 +0530


Hi !

    I have been using Webtest (build 380) to test our web application. Since 
this build does
not JavaScript, I downloaded build 441..
But the new build gives a Null Pointer Exception as given below:

D:\Projects\ToxVision_head\test>ant -buildfile test.xml
Buildfile: test.xml

invalidLogin:
[testSpec] ERROR (Step.java:333) - Cannot handle unexpected exception in 
step InvokePage at
file:D:/Projects/ToxVision_head/test/actions/startAtHome.xml:4:
with (stepId="goto home page", url="/", stepType="invoke")
[testSpec] java.lang.NullPointerException
[testSpec]     at 
com.canoo.webtest.engine.Context.setLastResponseForStep(Context.java:119)
[testSpec]     at 
com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:119)
[testSpec]     at 
com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:153)
[testSpec]     at 
com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePage.java:37)
[testSpec]     at com.canoo.webtest.steps.Step.execute(Step.java:99)
[testSpec]     at 
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
[testSpec]     at 
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:68)
[testSpec]     at org.apache.tools.ant.Task.perform(Task.java:341)
[testSpec]     at org.apache.tools.ant.Target.execute(Target.java:309)
[testSpec]     at org.apache.tools.ant.Target.performTasks(Target.java:336)
[testSpec]     at 
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[testSpec]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
[testSpec]     at org.apache.tools.ant.Task.perform(Task.java:341)
[testSpec]     at org.apache.tools.ant.Target.execute(Target.java:309)
[testSpec]     at org.apache.tools.ant.Target.performTasks(Target.java:336)
[testSpec]     at 
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[testSpec]     at 
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[testSpec]     at org.apache.tools.ant.Main.runBuild(Main.java:609)
[testSpec]     at org.apache.tools.ant.Main.start(Main.java:196)
[testSpec]     at org.apache.tools.ant.Main.main(Main.java:235)

BUILD FAILED
file:D:/Projects/ToxVision_head/test/stories/invalidLogin.xml:13: Test 
failed.
Exception raised: com.canoo.webtest.engine.StepExecutionException: 
Unexpected exception caught: java.lang.NullPointerException, Step: 
InvokePage at 
file:D:/Projects/ToxVision_head/test/actions/startAtHome.xml:4:  with 
(stepId="goto home pag
e", url="/", 
stepType="invoke")com.canoo.webtest.engine.StepExecutionException: 
Unexpected exception caught: java.lang.NullPointerException, Step: 
InvokePage at 
file:D:/Projects/ToxVision_head/test/actions/startAtHome.xml:4:  with 
(stepId="goto home page", url="/", stepType="invoke")
        at 
com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:334)
        at com.canoo.webtest.steps.Step.execute(Step.java:101)
        at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
        at 
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:68)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)


Total time: 2 seconds


-- The same tests work fine with build 380
Is this a bug in 441... If so, is there anyway I can get any build other 
stable build that supports
JavaScript.

That's all
AkhilHi !

    I have been using Webtest (build 380) to test our web application. Since 
this build does
not JavaScript, I downloaded build 441..
But the new build gives a Null Pointer Exception as given below:

D:\Projects\ToxVision_head\test>ant -buildfile test.xml
Buildfile: test.xml

invalidLogin:
[testSpec] ERROR (Step.java:333) - Cannot handle unexpected exception in 
step InvokePage at
file:D:/Projects/ToxVision_head/test/actions/startAtHome.xml:4:
with (stepId="goto home page", url="/", stepType="invoke")
[testSpec] java.lang.NullPointerException
[testSpec]     at 
com.canoo.webtest.engine.Context.setLastResponseForStep(Context.java:119)
[testSpec]     at 
com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:119)
[testSpec]     at 
com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:153)
[testSpec]     at 
com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePage.java:37)
[testSpec]     at com.canoo.webtest.steps.Step.execute(Step.java:99)
[testSpec]     at 
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
[testSpec]     at 
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:68)
[testSpec]     at org.apache.tools.ant.Task.perform(Task.java:341)
[testSpec]     at org.apache.tools.ant.Target.execute(Target.java:309)
[testSpec]     at org.apache.tools.ant.Target.performTasks(Target.java:336)
[testSpec]     at 
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[testSpec]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
[testSpec]     at org.apache.tools.ant.Task.perform(Task.java:341)
[testSpec]     at org.apache.tools.ant.Target.execute(Target.java:309)
[testSpec]     at org.apache.tools.ant.Target.performTasks(Target.java:336)
[testSpec]     at 
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[testSpec]     at 
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[testSpec]     at org.apache.tools.ant.Main.runBuild(Main.java:609)
[testSpec]     at org.apache.tools.ant.Main.start(Main.java:196)
[testSpec]     at org.apache.tools.ant.Main.main(Main.java:235)

BUILD FAILED
file:D:/Projects/ToxVision_head/test/stories/invalidLogin.xml:13: Test 
failed.
Exception raised: com.canoo.webtest.engine.StepExecutionException: 
Unexpected exception caught: java.lang.NullPointerException, Step: 
InvokePage at 
file:D:/Projects/ToxVision_head/test/actions/startAtHome.xml:4:  with 
(stepId="goto home pag
e", url="/", 
stepType="invoke")com.canoo.webtest.engine.StepExecutionException: 
Unexpected exception caught: java.lang.NullPointerException, Step: 
InvokePage at 
file:D:/Projects/ToxVision_head/test/actions/startAtHome.xml:4:  with 
(stepId="goto home page", url="/", stepType="invoke")
        at 
com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:334)
        at com.canoo.webtest.steps.Step.execute(Step.java:101)
        at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
        at 
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:68)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)


Total time: 2 seconds


-- The same tests work fine with build 380
Is this a bug in 441... If so, is there anyway I can get any build other 
stable build that supports
JavaScript.

That's all
Akhil

_________________________________________________________________
Post Classifieds on MSN classifieds. http://go.msnserver.com/IN/44045.asp 
Buy and Sell on MSN Classifieds.