Forum Discussion

nadja's avatar
14 years ago

Change cookie value in request

Hi!



Is it possible to change Cookie value in Http request header?

If it is, how can I do this?



Thank You!

5 Replies

  • Hi Allen,



    Suppose I have a page B that is available only if a certain cookie is found, cookie that exists only after a user has logged in on the site.

    Without the cookie, if I navigate to page B, I am being redirected to a different page, page A. If I do a load test navigating on page B, I get warning messages in the log, I guess because the cookie was not found and I was redirected to page A.



    How can I do so that I navigate to page B and run a successful load test?



    Thanks,

    Andrei

  • Hi Andrei,





    You need to record your load test from the moment you open the web browser and see an empty page (and all the cookies are cleared). This way, all the needed authentication steps will be recorded, and TestComplete will be able to process the authentication process correctly.


  • Hi Allen, 


    But I cannot access page B only if a certain cookie is found. To get that cookie I must first login and then logout. And if I record my test including the login and logout steps, I will also be load testing the login capabilities and not only the B page. 


    Thanks, 


    Andrei

  • Hi Andrei,



    That's the only way here - you can't make your test work without authenticating the virtual users in your system first. You can try using the Complex Tasks feature to split the login operation and your further actions as individual tasks. Please see the Using Complex Load Testing Tasks help topic for more information.