mobileNubmer is being generated in JSR223 PreProcessor but it's not replacing the parameter in the request body (JSON). Here is my setup and what am I doing wrong?
JSR223 PreProcessor
def randomValue = ${__Random(00000000,99999999)} as String
def mobileNumber = "04" + randomValue
vars.put('randomValue', mobileNumber)
Follow by HTTP request
HTTP request
POST - Body
{
"senderId": "Test",
"messages": [
{"to": ${mobileNumber}}]
}
Failed request
POST https://api
POST data:
{
"senderId": "SMAPIJ",
"messages": [
{"to": ${mobileNumber}}]
}