Existing request (example: login) reuse multiple time in other request (example: my account, my Profile)

I got the base collection test which I need to reuse continually in other collection.

Example base request: login test

My current login generates a token (which I set in an environment variable and use that for different request) which expires in seconds so in order to avoid false failure due to expire token I am running login test as the first request before executing any other test. But the issue is when login test change (example: new header or payload data) then I have to change same test for every place where I have to perform login test first before I can run another test.

Is there any way where I can reuse a single login test request from one folder and my other requested get executed after login test?

Hope this makes sense. If not then please reply to me for more clarification.

Thanks

Hi @Chirag.patel21 and welcome here!

Here’s a great blog post explaining how and when to use different type of variables:


In your case you could use Global variables to store the token even though I’d recommend to put all your requests in the same collection so you can make full use of the Collection runner and build a single test workflow.