[Seaside] JMeter, Seaside, Forms

Paul DeBruicker pdebruic at gmail.com
Wed May 5 02:53:59 UTC 2010

Thanks for the clarification Julian.

> Your requirement is to have input elements with IDs are are known in
> advance?

Yes I think so, but not IDs, NAMEs.  I'm not sure of the terminology, 
but here is an example:

If I put this in a form:
html textInput

in the page it renders as this:
<input type="text" class="text" name="text" id="textInput">

If I then change the seaside code to this in the form:

html textInput

in the page it renders as this:
<input type="text" class="text" name="1" id="textInput">

So the name attribute is changed while the id attribute stays the same. 
  To POST the form with JMeter, I need to be able to replicate what is 
submitted when a user clicks the submitButton. I think it submits the 
name attribute of the form element and the value of the form element as 
a name/value pair.  I don't think I can reliably do that now because the 
name portion of the name/value pairs in the POST will vary as the rest 
of the page changes.

> The issue it not so much with the form elements, I think, but with the
> callbacks. When you register a callback, it is assigned a unique key (using
> #nextId as you mention). That key needs to be the id of the form element in
> order for it to be triggered. I don't think you can easily specify custom
> callback keys.

It seems to me that the callback key is set as the #name of the form 
element rather than the #id of the form element.  Is that what should be 
happening?  If so I'll attempt your suggestion below.  And if the #id of 
the element is already supposed to be unique on the page, why not just 
use it as the callback key?

> You could obviously implement that somehow with the low-level pieces but I'm
> not sure exactly how off the top of my head.

> My other thought (not knowing JMeter at all)...
JMeter is like Selenium in that you can program it to submit forms or 
click links or whatever in an order you specify.  It can record and 
execute AJAX calls as well, but not mouse movements like drag-and-drop. 
The difference between the two is that Selenium actually controls a 
browser, and JMeter just sends the requests and delays as you specify. 
Because of this JMeter requires fewer resources to create a higher 
server load for load testing.  Miguel Coba wrote a blog post about using 
it with seaside here: 

> What about specifying your inputs with IDs and no callbacks. Then have a hidden element with a callback
> that looks for POST or query fields by name in the request ("self
> requestContext request") and does the needed processing.

That sounds like it will do it.  I'll see if I can figure out how to 
implement your suggestion and be back with questions.  Thanks


> Julian

More information about the seaside mailing list