Forum Discussion

Aravamudhan's avatar
Aravamudhan
New Contributor
7 years ago

How to Automate JWT Token based APIs using Groovy Script & TestRunner.bat file ?

Hi all.

 There is a new APIs being introduced in my Organization - which requires a User Level Token generated and a JWT token to be passed in the Header of the Request before submitting it.

 

I am trying to Automate this (test for Monitoring the health of APIs) using Groovy Script and TestRunner.bat file in SoapUI 5.2.1

 

Could you anyone throw some insights (or) guide me on how to use Groovy Script & TestRunner.bat file to Automate this ?

 

Steps to follow: for Manually generating User Level Token and JWT Token

  1. Open RESTClient in Firefox browser
  2. Click on Authentication and select “oauth2.0”, then it will show one popup window, Please fill all the information as shown and click on “authorize” 
  3. It will open a new window and then enter the LDAP Credential there, Enter details and click on secure login. Control will redirect to rest client window.
  4. In the rest client window click “CTRL+SHIFT+K”, It will show two window in split mode
  5. In above you will find JWT token along with normal token
  6. Pass this JWT token in one separate header

 

NOTE: I cannot share the API details/Project files in this forum for security reason.

No RepliesBe the first to reply