1
votes

I am testing particular application using JMeter 2.9.There My test plan is Thread group--> Transaction Controller.Inside that various recorded requests are there.I am using HTTP request defaults,HTTP Cookie manager and HTTP header manager,and a view result tree for validation.I found one token i.e. CSRF token to be correlated and I did correlation.But for a particular request I am finding "Session expired..Login again" response much before the logout request.My transaction flow is to Login--> Search a content-->Logout.

Please help me finding a solution.

2
Sounds like you missed a token somewhere :)Ophir Prusak
Can you show the screenshot for your test plan?vins

2 Answers

1
votes

Try put the element: HTTP Cookie Manager in Thread Group, first item.

enter image description here

1
votes

the problem can be in the following areas: -you were redirected automatically instead of following redirects -login hasn't succeeded -the session id has not been successfully passed on to the request after login

The JMeter documentation states this: I've set up JMeter to sample the same URLs as my browser, why is JMeter not seeing the same responses?

There are various different reasons for this:

Cookies - make sure you added a Cookie Manager. Browsers process cookies unless you set them up otherwise, but JMeter does not process cookies unless you add a Cookie Manager. User-Agent - the User-Agent is a header that is sent by browsers; it identifies the browser type. Some servers are sensitive to this setting and generate different results for what they think are different browsers. The Header Manager is used to add headers such as User-Agent. Hidden fields - if you did not use the JMeter Proxy (or other application) to record the test plan, then it is easy to miss hidden fields from forms. Dynamic field names/content - some servers use varying names for fields. So although the test plan may be correct at the time of creation, it does not work when replayed. URL rewriting - TBA

from http://wiki.apache.org/jakarta-jmeter/DifferentBehaviour