cancel
Showing results for 
Search instead for 
Did you mean: 

How to automate dynamic token generated by a URL for Rest API in SOAPUI ?

Highlighted
New Member

How to automate dynamic token generated by a URL for Rest API in SOAPUI ?

For my project I have created test cases in SOAPUI for Rest project. I have to pass token in header for each test steps that I have added in the test cases.

Also the token validity only for 1 hour. So every hour I have to enter the token in the headers.

I want to know is there any way automate this token entry and generation dynamically ?

For now what I am doing is getting token every time by refreshing the URL in every 1 hour and putting it manually in header of every test case and test steps.

1 REPLY 1
Highlighted
Community Hero

Re: How to automate dynamic token generated by a URL for Rest API in SOAPUI ?

Each of your test cases should probably involve getting a new token and then using that token, every time you run it. I've put together an example project that shows you how to do this (attached).

 

The important bit is done in the Assertion on the "Get token" step.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors