title: Funkload and cookies
body: <p>I have trouble setting up funkload to work well with cookies. I turn on <code>fl-record</code> and perform a series of requests of which each is sending a cookie. If I use the command without supplying a folder path, the output is stored in TCPWatch-Proxy format and I can see the contents of all the cookies, so I know that they are sent. </p>
  
  <p>For example this is the contents of <code>watch0003.request</code>:</p>
  
  <pre><code>GET http://mydomainnamehere.pl/api/world/me/ HTTP/1.1
  Host: mydomainnamehere.pl
  Proxy-Connection: keep-alive
  Referer: http://mydomainnamehere.pl/test/engine/
  X-Requested-With: XMLHttpRequest
  User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.57 Safari/534.24
  Accept: */*
  Accept-Encoding: gzip,deflate,sdch
  Accept-Language: pl,en-US;q=0.8,en;q=0.6,fr-FR;q=0.4,fr;q=0.2
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
  Cookie: Beacon-ClientID=&lt;&lt;&lt;some-beaconpush-id-here&gt;&gt;&gt;; sessionid=&lt;&lt;&lt;some-session-id&gt;&gt;&gt;; fbs_&lt;&lt;&lt;some-facebook-id&gt;&gt;&gt;="access_token=&lt;&lt;&lt;some-access-token&gt;&gt;&gt;&amp;expires=1308254400&amp;secret=&lt;&lt;&lt;some-secret&gt;&gt;&gt;&amp;session_key=&lt;&lt;&lt;some-session-key&gt;&gt;&gt;&amp;sig=&lt;&lt;&lt;some-signature&gt;&gt;&gt;&amp;uid=&lt;&lt;&lt;some-user-id&gt;&gt;&gt;"; Beacon-Preferred-Client=WebSocket
  </code></pre>
  
  <p>However if I run <code>fl-record</code> with a name of the test case and by doing so order funkload to store the output as a python test, all the Cookies are omitted. There isn't a single line in the code that would have anything to do with them:</p>
  
  <pre><code>import unittest
  from funkload.FunkLoadTestCase import FunkLoadTestCase
  from webunit.utility import Upload
  from funkload.utils import Data
  #from funkload.utils import xmlrpc_get_credential
  
  class Simple(FunkLoadTestCase):
  
      def setUp(self):
          """Setting up test."""
          self.logd("setUp")
          self.server_url = self.conf_get('main', 'url')
          # XXX here you can setup the credential access like this
          # credential_host = self.conf_get('credential', 'host')
          # credential_port = self.conf_getInt('credential', 'port')
          # self.login, self.password = xmlrpc_get_credential(credential_host,
          #                                                   credential_port,
          # XXX replace with a valid group
          #                                                   'members')
  
      def test_simple(self):
          # The description should be set in the configuration file
          server_url = self.server_url
          # begin of test ---------------------------------------------
  
          ...
  
          # /tmp/tmp5Nv5lW_funkload/watch0003.request
          self.get(server_url + "/api/world/me/",
                   description="Get /api/world/me/")
  
          ...
  
          # end of test -----------------------------------------------
  
      def tearDown(self):
          """Setting up test."""
          self.logd("tearDown.\n")
  
  if __name__ in ('main', '__main__'):
      unittest.main()
  </code></pre>
  
  <p>There is also a configuration file, but nothing about cookies there either.</p>
  
  <p>On the other hand the documentation states that fl has (Cookie support). I've also found some bugfixes in the previous releases concerning Cookie support so I can assume this isn't just an empty statement. I've also found a point in one of the changelogs that states that "deleted cookies" are not included in the output. This got me wondering that maybe the problem is that the cookies as they were recorded are marked for deletion or are recognized as such by fl upon conversion from the TCP-Watch format to an actual testcase. This is just a wild guess however.</p>
  
  <p>I'd like to know:</p>
  
  <ul>
  <li>If you ever had successes with support of funkload for cookies. If so, which version were you using. </li>
  <li>Of your general experiences with funkload and whether or not it is worth using in a more complex setup.</li>
  </ul>
  
  <p><strong>EDIT</strong></p>
  
  <p>Apparently some of the requests that are recorded by <code>TCPWatch</code> are totally ignored and not included in the output test case. Anybody has idea why would it do that? Does it have anything to do with redirection?</p>
  
  <p><strong>EDIT(2)</strong></p>
  
  <p>Ok, it does. This one thing actually makes sense. It leaves out the results of redirection as these will be generated by simply following <code>HTTP 302 Found</code>. However the question of cookies still remains unexplained.</p>