0

I want to stress test a system based on Apache Wicket, using grinder. So what I did was that I used grinder's TCP Proxy tool to record a test session in my Application and then fed the generated test script to grinder to stress test the system; but we found out the tests aren't carried out successfully.

After a lot of tweaking and debugging, we found out that the problem was within the wicket's URL generation system, where it mixes the page version number into its URLs.

So I searched and found solutions for removing that page version number from the URLs (Like this), and used them and they worked and removed those version numbers from the URLs used in the browser. But then again, the tests didn't work.

So I inspected more and found out that even though the URLs are clean now, the action attribute of forms still use URLs mixed with page version number like this one : ./?4-1.[wicket-path of the form]

So is there anyway to remove these version numbers from form URLs as well? If not, is there any other way to overcome this problem and be able to stress test a wicket web application?

Thanks in advance

Community
  • 1
  • 1
Ashkan Kazemi
  • 1,077
  • 8
  • 26

2 Answers2

0

I have not used grinder, but I have successfully load-tested my wicket application using JMeter Proxy; without changing Wicket's default version mechanism.

Here is the JMeter step-by-step link for your reference:

https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf

Basically, all I did was running proxy server to accept web requests from the browser to capture the test scenarios. Once done collecting the samples, then change the target host url to whichever server you want to point to (other than your localhost).

Alternatively, there is another load testing tool BlazeMeter (compatible with JMeter). You could add the chrome browser plugin for quick understanding.

Also, you might want to consider mounting your packages to individual urls for 'cleaner' urls. That way, you have set of known urls generated for pages within same package (for example, /reports for all the reports pages within reports package).

Hope this helps!

-Mihir.

Mihir
  • 270
  • 3
  • 9
  • thanks @Mihir but the problem is that our application doesn't have URLs at all and is actually a singlepage application, and also contains a lot of AJAX calls, so It isn't as easy as you say it is for us – Ashkan Kazemi Apr 28 '16 at 11:01
  • when I run grinder, I have a lot of this exceptions in my tomcat log : org.apache.wicket.core.request.handler.ComponentNotFoundException: Component 'pageContainer:ajaxIndicatorContainer:panel:content:htmlForm:form:iframe-print' has been removed from page. what should i do? – Ashkan Kazemi Apr 28 '16 at 11:30
  • In that case you could use Regex patterns for testing? Something like mentioned on https://guide.blazemeter.com/hc/en-us/articles/207421325-Using-RegEx-Regular-Expression-Extractor-with-JMeter. You will have to find similar solution within grinder. – Mihir Apr 28 '16 at 13:02
0

You should not ignore/remove the pageId from the urls. If you remove them then you will request a completely new instance of the page, i.e. you will lose any state from the original page.

Instead of using the href when recording you need to use the attribute set (by you!) with org.apache.wicket.settings.DebugSettings#setComponentPathAttributeName(String).

So Grinder/JMeter/Gatling/... should keep track of this special attribute instead of 'href' and later find the link to click by using CSS/XSLT selector.

P.S. If you are not afraid of writing some Scala code then you can take a look at https://github.com/vanillasource/wicket-gatling.

martin-g
  • 17,243
  • 2
  • 23
  • 35