Differences between revisions 3 and 4
Revision 3 as of 2007-10-16 20:13:47
Size: 1363
Editor: d220-238-8-101
Comment:
Revision 4 as of 2009-09-20 21:56:33
Size: 1365
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
The JSF RI implementation is similar to the MyFaces except the hidden field has a different name.[[BR]]
The steps are the same that explained in PerformanceTestingWithJMeter in the MyFace Wiki (before starting, read [http://wiki.apache.org/myfaces/PerformanceTestingWithJMeter]). In order to simulate the JSF ViewState request parameter, set up JMeter to record your request/response streams and use the scripts JMeter creates as a starting point.
The JSF RI implementation is similar to the MyFaces except the hidden field has a different name.<<BR>>
The steps are the same that explained in PerformanceTestingWithJMeter in the MyFace Wiki (before starting, read [[http://wiki.apache.org/myfaces/PerformanceTestingWithJMeter]]). In order to simulate the JSF ViewState request parameter, set up JMeter to record your request/response streams and use the scripts JMeter creates as a starting point.
Line 7: Line 7:
'''Extract the ViewState'''[[BR]]
To simulate the ViewState parameter create a JMeter RegEx Extractor. Apply the extractor to the Thread Group. Set the reference name as: jsfViewState. The RegEx is different than with MyFace, use {{{<input type="hidden" name="com\.sun\.faces\.VIEW" id="com\.sun\.faces\.VIEW" value="(.+?)" />}}} instead of {{{<input type="hidden" name="javax\.faces\.ViewState" id="javax\.faces\.ViewState" value="(.+?)" />}}}. Set the template to $1$ and Match No to 0.[[BR]]
'''Extract the ViewState'''<<BR>>
To simulate the ViewState parameter create a JMeter RegEx Extractor. Apply the extractor to the Thread Group. Set the reference name as: jsfViewState. The RegEx is different than with MyFace, use {{{<input type="hidden" name="com\.sun\.faces\.VIEW" id="com\.sun\.faces\.VIEW" value="(.+?)" />}}} instead of {{{<input type="hidden" name="javax\.faces\.ViewState" id="javax\.faces\.ViewState" value="(.+?)" />}}}. Set the template to $1$ and Match No to 0.<<BR>>
Line 11: Line 11:
'''Change the dynamic variable'''[[BR]] '''Change the dynamic variable'''<<BR>>

Testing a SUN RI JSF Application with JMeter

The JSF RI implementation is similar to the MyFaces except the hidden field has a different name.
The steps are the same that explained in PerformanceTestingWithJMeter in the MyFace Wiki (before starting, read http://wiki.apache.org/myfaces/PerformanceTestingWithJMeter). In order to simulate the JSF ViewState request parameter, set up JMeter to record your request/response streams and use the scripts JMeter creates as a starting point.

Extract the ViewState
To simulate the ViewState parameter create a JMeter RegEx Extractor. Apply the extractor to the Thread Group. Set the reference name as: jsfViewState. The RegEx is different than with MyFace, use <input type="hidden" name="com\.sun\.faces\.VIEW" id="com\.sun\.faces\.VIEW" value="(.+?)" /> instead of <input type="hidden" name="javax\.faces\.ViewState" id="javax\.faces\.ViewState" value="(.+?)" />. Set the template to $1$ and Match No to 0.
This extractor will find the ViewState parameter and store it in a JMeter variable called jsfViewState so it can be passed down in future requests.

Change the dynamic variable
Modify the recorded HTTP Request for all JSF requests using the POST method. Replace the value of the parameter com.sun.faces.VIEW with ${jsfViewState}

JSF_test_with_SUN_implementation (last edited 2009-09-20 21:56:33 by localhost)