Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Within JMeter, you can add a "Regular Expression Extractor" listener to any requested page in your test script like this. This is how the above regex will look like:

Image Added

The "$1$" refers to the content matched by the first regular expression that we have surrounded with brackets. Here there is only one bracketed expression.

...

Using this in the next step of the script is easy as shown below:. Just append ${nextUrl} to the base path of your Wicket app. That's it!

Image Added

If you have some deeply nested components you can easily use the resulting Wicket path, e.g. "table:row:5:link". The good thing is that this path normally does not change.

What about forms?

No Format
<form wicket:id="form">

This is exactly the same as handling a link. The HTML generated at runtime will be something like this:

...

And the regex required is exactly the same as handling a link:

No Format
"([^"]+:form:[^"]+)"

Using this is almost the same as a link but this time we set the request method to POST and we also provide the expected request parameters.

Image Added

There is one more corner case we need to consider. The wicket Link class allows you to nest an anchor tag within some other HTML tag for e.g. a TD tag. So if you have:

...

I have not yet tried to test any Ajax functionality with this approach. However I think that if you record a JMeter test involving Ajax requests and analyze the requests, you should be able to easily derive the steps and regular expressions required. If you have any success with this, please inform let me know Peter Thomas or inform the Wicket users mailing list or better still, please update this wiki page. Thanks!