1

def userName = 'ABC'

def input json = {
    "integration": {
        "serviceData": {
            "integrationService": {
                "name": "fld_<tenantID>_stage00.integrations:<integrationName>"
            },
            "gitComments": "Commit made by: ABC"

        }
    }
} 

In the above json I need to parameterize the user name 'ABC'

If I send "gitComments": "#(userName)"

It is checking 'ABC' which is fine But I need to prefix the String "Commit made by: " And then #(userName) in the input json.

Thanks in Advance

1 Answer 1

2

https://github.com/intuit/karate#rules-for-embedded-expressions

* def gitComments = 'Commit made by: ' + userName
* def json = { gitComments: '#(gitComments)' }
Sign up to request clarification or add additional context in comments.

1 Comment

Also by github.com/intuit/karate#rules-for-embedded-expressions, "#('Commit made by: ' + userName)" should also work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.