Forum Discussion

Tush's avatar
Tush
Occasional Contributor
7 years ago

Unable to maintain session between Test Suites.

I am trying to modularize my test cases. For example there are 4 test suites(A,B,C,Lib)
'Lib' testsuite contains Login to session and other common functions(testcases) which are called from other TestSuits(A,B,C) .
I want to maintain the session created in 'LIb' across all my other Testsuites.
Tried-
1. enable "Maintain HTTP Session"
2. Copy HTTP Session under "Run Test cases options"
3. Added cookies in Header via "Events" tab.(https://support.smartbear.com/readyapi/docs/testing/scripts/samples/headers.html)

None of the above solution worked.

How can I maintain the same session across the TestSuits?

8 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    In case, if you are using Events and sending Cookie as Header, then you do not have to use Maintain Http Session.
    • Tush's avatar
      Tush
      Occasional Contributor

      I tried sending the cookie via Header, but while running the test case multiple instances of "Cookie" headers were created.

       

      Is there any other way to maintain a single session across all the Test suites?

      • nmrao's avatar
        nmrao
        Champion Level 3
        Not really how you saved the cookie? test case level? suite level?
        Is the same cookie to be used for all the steps spread across test cases and suites?