Parameterize a Web Service Object


#1

This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/parameterize-a-web-service-object.html

#2

Hello!!
I need to pass parameterized Body from test Case, How can I achieve that?
I tried lot other options available but didn’t get any help.

thanks in advance.


#3

Check out this link,

it explains how to add global variables which can be manipulated in your test case for webservices


#4

You try same process:

“Field” : ${Field}

add Field to Variables


#5

Hello,

please, advice how you handle the following scenario

need to pass variable with dynamically generated random string, in my case

Variable

message_id = randomString

Thanks


#6

Click the above link, it explains how to make a Global Variable.

Once made within your test case scripting area simple assign your randomly generated variable to it like this:

GlobalVariable.MyVariableName = message_id


#7

I need to pass parameterized values in the HTTP Body -> Form-data section How can I achieve that in Katalon?


#8

My Verification tab got hide how can i get that back ?What command or keys needs to press to get it back?


#9

Hi ,

My rest post URL contains $ in it. Since $ is used in Katalon to use as a variable, how to escape $ in the URL.

https://some.test.com/datval/Sessions?$numb=10&$search=id 7&$presence=yes

Thanks,
Vedesh


#10

Vedesh

The “$” character is a reserved character and you should not use it in a URL (unless it is previously percent-encoded before building the URL string).

image

https://tools.ietf.org/html/rfc3986#section-2.2


#11

Can you help with variables in HTTP_Body
I try to send variables like this:

{
  "clientId": $login,
  "password": $password
}

but this don’t working :frowning:


#12

use \ for escaping


#13

try to use variables in headers, not working
Work only in parameters for URL


#14

How to use variables in verification step for rest API?