[Webtest] Bug in Canoo - com.meterware.httpunit.WebForm$NoSuchParameterException is uncaught

John Willemin webtest@lists.canoo.com
Fri, 09 May 2003 17:45:52 -0400


Just like before, there is an exception coming out of the HttpUnit code 
that's not getting handled. This causes any test which tries to set a 
parameter that isn't there to fail and exit silently with no error message.

I found this bug while trying to get a clickbutton working, but there are 
probably other places.

I am not going to get specific (i.e. posting patches/fixes) until someone 
on the list who impacts the codebase tells me that they're listening :) I 
am still waiting to hear about the other bug I found (the error 500).

Here's a stacktrace. The line numbers are probably off somewhat in 
ClickButton as I have jammed a good amount of debugging in there.

Thanks for your time,
John Willemin


  [testSpec] com.meterware.httpunit.WebForm$NoSuchParameterException: No 
parameter named 'blah' is defined in the form
  [testSpec]     at 
com.meterware.httpunit.WebForm.setParameter(WebForm.java:518)
  [testSpec]     at 
com.meterware.httpunit.WebForm.setParameter(WebForm.java:512)
  [testSpec]     at 
com.canoo.webtest.steps.request.ClickButton.addParameter(ClickButton.java:271)
  [testSpec]     at 
com.canoo.webtest.steps.request.ClickButton.setParameters(ClickButton.java:207)
  [testSpec]     at 
com.canoo.webtest.steps.request.ClickButton.doExecute(ClickButton.java:109)
  [testSpec]     at com.canoo.webtest.steps.Step.execute(Step.java:56)
  [testSpec]     at 
com.canoo.webtest.engine.Engine.executeSteps(Engine.java:32)
  [testSpec]     at 
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.java:55)
  [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)