I want to do a load test my Heroku application using Jmeter. To access the functionality of the application, I need to login through Facebook first. I tried with browser recording using proxy server. But the problem is the code parameter (response_type) returned by facebook is hard coded in the callback URI. So its giving exception (Code expired exception) while running the Jmeter script.
I am able to view the code in response header of https://www.facebook.com/dialog/permissions.request
URL. So I need to grab this code from this header dynamically and put in the code parameter of callback URL.
For this I am using Regular Expression Extractor in Jmeter under /dialog/permissions.request
URL.
My response header looks like below:
Cache-Control private, no-cache, no-store, must-revalidate
Date Wed, 26 Dec 2012 13:37:17 GMT
Expires Sat, 01 Jan 2000 00:00:00 GMT
Location http://myapplication.herokuapp.com/oauth/authenticate/facebook?code=SOME-CODE
P3P CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
I want to extract this code=some code
and put it in the next URL using regular expression extractor.