Problem: Testing JSF and Trinidad application with JMeter .
Why this is a problem: due numerous states that must be handled .
Thinks to remember during test creation: PEBKC (problem exist between keyboard and chair) - if something is not working it is always your fault. I lost almost due days in debugging due misspelled state variable!
Ok, now let's start .....(this might help to my previous colleagues from Reflective too):)
We start with usual recording technique won't get into details here: run jmeter proxy->set proxy to browser->browse
You can remove static resources if you want (must concentrate on dynamic content).
Identify dynamic items you need to handle:
1. Username/Pass
2. Usual dynamic data
(!)3. JSF State
(!)4. Trinidad components internal state
3. In order to propagate JSF state on each page a following Post Processor(RegEx Extractor):
someVariable
$1$
1
(This is for myFaces implementation it differs for various vendors.)
After you have extracted JSF State you must populate it with next POST.Do this for each page, keep in mind that JSF State is different on each page.
4. Trinidad state is generated on previous page(that links to the URL with something.faces?_afPfm=4b28da42). So the trick is to add one more Post Processor (RegEx to previous page):
trVariableState
something\.faces\?_afPfm=(.+?)"
$1$
1
Also make sure JSF state is always encoded in POST.
So that should be, I will review later if forgot something.