Apache JMeter can be used to test performance of web sites amongst other things. JMeter supports Post-Processors which can be used with regular expressions to extract data from a web servers response and then used in the next request. We can use this feature to extract continuation id's enabling us to load test Flow with Continuations.

The attached JMeter script provides an example of testing the calculator flow example. If you use cocoon.sh/cocoon.bat to run Cocoon in Jetty then the script is ready to go. Simply start Jetty (cocoon.bat/sh servlet) and JMeter. Load the script into JMeter and select Run -> Start from JMeters menu.

The example script is setup to test the XSP version of the calculator flow, to test the Garbage version replace 'samples/flow/calc/' with 'samples/garbage/calc/' in each '* Request' elements path.

If your test server is not on localhost port 8888 then you'll need to edit JMeter's 'HTTP Request Defaults' element to reflect this. Also, if Cocoon is not deployed on your servers root context you'll need to update all the '* Request' elements to reflect this.

The example script was built in and has only be tested on jakarta-jmeter-1.9.RC2. For more information about using JMeter see the JMeter User's Manual

Attachment: CalculatorFlow.jmx

  • No labels