Right way to use variable

I’m using variable in this way and I found it is very tedious to input the string at many places.
Please advise or correct me if I can work in better way.

Example:
At profile,
Add url, value www.test.com
Add testid, value empty

Object for POST endpoint
Http://${url}/test/${testid}

At the object variable tab
Add url, set to global variable, select the value which set at profile.
Add testid, set to string, select the value empty.

Test case to call the object
def testid = test123
def callpost = WS.sendRequestAndVerify(findTestObject(‘Object Repository/post’, [(‘testid’) : testid, (‘url’) : GlobalVariable.url]))

Hi @Gan_Jyi_Yng,
You can set http://${GlobalVariable.url}/test/${GlobalVariable.testid}.

once i set this
http://${GlobalVariable.url}/test/${GlobalVariable.testid}.

i do not need to input them at object variable tab?

but i still need them in profile?

what about test case when calling the object, am i need to input variable like this?
WS.sendRequestAndVerify(findTestObject(‘Object Repository/post’, [(‘testid’) : testid, (‘url’) : GlobalVariable.url]))

Hi @Gan_Jyi_Yng,
Once you set as my instruction, you do not need to input your variables at object variable tab. Of course, you will need your variables to be defined in a profile. Also, in your test script, you don’t need to input the variables anymore.