Iīm new with jMeter tests and I have some problems with jMeter and login.
I open Jmeter with my -H proxyname and -P portnumber.
There are two situation that I cannot manage:
1) I create my thread group and I add an Http request.
Server name: www.domain.com
parameters: ulogin/myloginname and password/mypassword.
When I run the test there are no errors:
"Thread Name: Test 1-3
Sample Start: 2008-02-01 09:50:21 CET
Load time: 281
Size in bytes: 13392
Sample Count: 1
Error Count: 0
Response code: 200
Response message: OK
But if I see the response data, the html shows the login form... Does it mean that Iīm not logged in? Which is the problem? How do I login to my web application?
2)I add an HTTP Proxy server to the workbench with name "localhost" and port "8080". Then I set the same properties to my browser (remember jMeter is started with my proxyname and port). When I login to my web application, jMeter "feels" the login and stores all the requests. The question is: if I have a search query in my application, how do I see the result in jMeter and search if there is some text I would like to have on the response?
1) Do you have "follow redirects" option enabled? Otherwise check with a HTTP sniffer what happens when you do it manually.
2) Add a "View results tree" listener and you can see all requests and responses. But make sure to disable this listener when running a real test, otherwise JMeter runs out of memory.
1) Itīs the same with the "follow redirect" option enabled. In the "result tree -> response data -> render HTML" option I always see the login form that asks for username and password. Is that already logged in?
What do I have to check with the HTTP sniffer?
") I have a "View results tree" listener and I can see the http traffic... but how do I search for an html tag in the response?
Problem solved. Thanks to all! Now I have a new problem...
I just started the HTTP proxy server and saw that the names of the fields were wrong. Then I added the cookie manager and now the login and all the following requests work. For the search of text in the response I added a "Response assertion".
There is also a chance that there can be other unique values that need to be correlated. Create 2 scripts and compare them side-by-side.
You can use WireShark/Ethereal to sniff out HTTP traffic from the browser.