I am trying to perform a small load test on site I have developed. It requires user to login to application and then perform further actions.
Here as per the tutorials I have followed I have placed a cookie manager to store the cookies. Now the response header sent by doLogin.php -
But this cookie PHPSESSID never sent back to server in the redirected request to home.php
so home.php sees it as an unauthorized request and denies. So is there anything I am missing here?
Thanks
You need add 1 more HTTP request to get login page with GET method. Then you can use your added login request with user name and password with POST method. Just add 1 more http request above your already added login request.
You need to enable/add the property CookieManager.save.cookies=true
in the jmeter.properties file under /bin folder of JMeter installation path.
This enables the cookies from the first request to be stored under the current thread. HTTP Cookie Manager might explain it better.