Forum Discussion

endorium's avatar
endorium
Frequent Contributor
7 years ago

Passing valid cookie for test to run

I am new to ReadyAPI.

 

I have my output from swagger and imported it into READYAPI. My first test for testing the Security login passes. I pass it a valid username and password and the API returns a valid response with a token.

 

My problem is any other API test I try to tun it complains I do not have a valid token. It seems I need to add to each test a valid username and password so it can return a valid token and the test be ran? ANy ideas and looked through the help and not finding much to help.

5 Replies

  • endorium's avatar
    endorium
    Frequent Contributor

    noone? Surely this cannot be unusual situation but cannot find anything to help online.

     

  • nmrao's avatar
    nmrao
    Champion Level 3
    Token is to be used with the subsequent tests right?
  • endorium's avatar
    endorium
    Frequent Contributor

    Yes, every API test I run will need a valid token to be able to run.

    I can set up a test suite and run the valid token api test first but then the next fails as there is no longer a valid token.

    • nmrao's avatar
      nmrao
      Champion Level 3
      Can you please screen shot of the same?
      How are you passing the retrieved token to subsequent requests?
  • endorium's avatar
    endorium
    Frequent Contributor
    I am new to readyapi so currently I am not passing the token on to subsequent tests.
    I can’t find any documentation on how to do this?