JSESSIONID not working as expected in Jmeter - oracle

I'm working on a stress/test project for a application that uses ADF 11g.
I've recorded the log in process with Jmeter test script recorder.
My steps were:
Open up the site
Type in Username and Password
Click login
I have extractors and Cookie Manager set up correctly and replaced all the afrLoops, JsessionID, javax.faces.ViewState...etc
When I run the thread in Jmeter, the Login step respond always shows that it times up caused by inactivity.
So I looked deeper into it.
I used chrome's inspect element feature and check out the JSESSIONID while performing the steps live.
I saw that the JSESSIONID at the login page and the JSESSIONID after login are different.
but in my Jmeter test the JSESSIONID stays the same before and after login.
Does anyone know what is going wrong?
Thanks.

You need a different JSESSIONID after logon - is normal.
please have a look at this blog: http://soadev.blogspot.ro/2014/04/jmeter-load-test-oracle-adf-applications.html

I am also testing a website having two JSESSION Ids before and after login. Jmeter cookie manager stores only the latest JSESSION id. If you try to check in Chrome's Inspect element, you will find that after login your cookie value get changed and that's what Jmeter Cookie manager is storing. Therefore, when you check cookie value in debug sampler, you will get only one JSESSION id

Related

How to login to liferay website using JMeter

I am facing one problem that i am unable to login to the liferay website using JMeter.
The problem i know already but don't know how to hanmdle it.
I get to know that "p_auth" token is requried to access the sub pages, but here i am facing an issue in which i don't even able to acccess the login page itself if run the script second time.
My concerns:
how to check "p_auth" token parameter for login page (i.e without login)
Please help me to solve the problem.
Note: i tried to extract the "p_auth" token , but i am unable to see any "p_auth" token for login page itself(i.e without login.. just a login page(get api))
Your test plan need to look like:
Open Login Page - HTTP GET request
Extract p_auth dynamic parameter value using a suitable JMeter Post-Processor
Perform the login - HTTP POST request where you need to provide your credentials and the p_auth token value from the previous request
You won't be able to "see" the token in the page, it's hidden in the page source so you will need to use browser developer tools or JMeter's View Results Tree listener in order to "see" the token value.
Also don't forget to add HTTP Cookie Manager to your test plan as missing CSRF token is not the only thing which can stop you from logging in.

How can I resolve active session problem in JMeter

Whenever I run the login/logout script, I get You have already logged in. How to resolve this?.
when I try to login manually. I got this popup message.
This user is already logged in. Do you want to terminate other active session.
So, how to handle this situation in JMETER.
enter image description here
Please implement the logout request and after that clean the cookie.
Follow the instruction as mentioned in
Jmeter Clear cookies after each http request
It means that logout doesn't really logs you out, not knowing the details of your test/application it's not possible to come up with a comprehensive solution, in the meantime you can try unticking Same user on each iteration on Thread Group level:
or ticking Clear cookies each iteration box in the HTTP Cookie Manager/HTTP Cache Manager
If your session is being orchestrated by a custom Header - remove it from the HTTP Header Manager somehow

Make a request handle redirect by providing necessary parameters

I'm using jmeter to load test a Feature Page.
My jmeter requests (for that page) are being redirected to a login page. How do I provide login info for that redirect?
I already tried:
Controller
Login Page
Feature Page
Logout
But somehow a user even though already authenticated via Login Page is still being asked to login on the Feature Page.
Wondering if someone has a suggestion.
Make sure you're really logged in as "green" result in JMeter doesn't necessarily indicates successful request. You can verify responses using View Results Tree
listener
Add HTTP Cookie Manager to your Test Plan, if your application uses cookies for establishing/maintaining user session it should automatically resolve your problem
Inspect your test plan for any dynamic values (request parameters, headers, URL postfixes, etc.), if the are - they need to be correlated.

Unable to login using jmeter?

I have recorded login script using jmeter and when I run it the user is not logged in. There is no session parameter to pass.
Below is application which used for my study.
www.gandermountain.com
Looking into the network dump
I believe all you need to do in order to mimic the login is just to add HTTP Cookie Manager to your Test Plan
What error you are getting while running your script? If you are not able to logon, add the cookie manager (Test Plan -> Add -> Config Element -> HTTP Cookie Manager) under your test plan.
If it doesnt work, check any other parameter values getting changed in your home page and login requests. If yes, parameterize that too and then try. It will work

Jmeter: To login multiple times and hitting multiple URLS

I am novice in Jmeter, just started to know its inner functionality. I am stuck in a problem. I have to hit multiple urls (only search id) is changed so in "HTTP Request" i have placed "/build-4.4.10.0/?earchId=${ID}&Application=sc&IsSearchLink=TRUE"
I am providing session key and that search id through csv file. Problem is though its going to the link but redirecting it to login page, and i do not know how to create users on run time and assign to that each URL.
I have 200+ URLS, what should i do, please guide
Thanks
If your application needs any login authentication and/or cookies, then you will need to add the Cookie manager for maintaining the session, else application will not be able to maintain a session and it will throw the user out of the application, then redirecting it to the login page.
You can refer to the below mentioned links for more information about cookie manager.
https://sqa.stackexchange.com/questions/13966/jmeter-http-cookie-manager/13975#13975
http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Cookie_Manager

Resources