0

I am configuring the web service in Katalon Studio. I have to take element value from web service response and stored it in global variable and the same element has to be sent in next web service request or header part. Whenever i hit this web service, i will get unique values. The same values need to be updated in global variable and have to sent current value in next service.

OAUTH - In below example i need to store access_token 7 its value in Global Variable and need to use it across.

"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzQ2OTY0NzQsInVzZXJfbmFtZSI6ImJlYXN0dGVzdDQiLCJhdXRob3JpdGllcyI6WyJST0xFX0JFQVNUX0JPX0lUIiwiUk9MRV9CRUFTVF9DQVBfQURNSU4iLCJST0xFX0JFQVNUX1NVUEVSVVNFUiIsIlJPTEVfQkVBU1RfRlJBVURfVkVMT0NJVFlfQ0hFQ0siLCJST0xFX0JFQVNUX0JBQ0tfT0ZGSUNFIiwiUk9MRV9CRUFTVF9DQVBfTU9OSVRPUiIsIlJPTEVfQkVBU1RfRlJPTlRfT0ZGSUNFIl0sImp0aSI6ImU1YWVmNDk1LTAwN2YtNGM4NS04MmZiLWYzZjEzNjNlNTgzNiIsImNsaWVudF9pZCI6Ik9hdXRoLVRydXN0ZWQtQ2xpZW50Iiwic2NvcGUiOlsicmVhZCIsIndyaXRlIl19.hD3BXKJbo2sTkEhQAYxUi7CDU45-ZtZWjjpO99-21McrvK74Ffh0uIImFTE71JI0wjwUWZ1zM28rZ7pQfQB9TLOeUW1bImtFDMaHIg_NvfWXLNCQe8lREjCv-LhpSkKksUyBU85A-Q8T4az0VQyKGs0AfHvc2gTrEWuoJGQpDfePz3l_10fJnEqC5arev-vIF1zeMijHXUWQd-AGKr_PLn2S8iPOpkBAiNmz1SDTDBZe1jdpVfYSC1RJQAbzOWGpL0ia7TAzBPpEpn6XV3emoIWIpFTJY0CNavQvEL9fc-D8nPmwF4q_Tnm2LnqbtCIlqk2SbFU5bdSmtIZfl5atxA",

Transaction Id: In below example i need to store transactionID and its value in global variable and need to use it across.

{
  "transactionID":"09610123112519543357"
}
James Z
  • 12,209
  • 10
  • 24
  • 44
Gopi
  • 35
  • 1
  • 8
  • 1
    You need to have your test cases inside of the same test suite in order for them to share a common global varaible. See here: https://stackoverflow.com/questions/58850889/store-generated-dynamic-unique-id-and-parse-to-next-test-case/58852026#58852026. – Mate Mrše Nov 25 '19 at 15:20
  • If you need to send the access_token in request header, you'll need another tool to do that. Katalon (selenium) simulates front-end user. Sure you can fire http request via javascript or java or whatever. Consider to use Postman, SOAP UI, or similar sw. – pburgr Nov 27 '19 at 12:51

0 Answers0