Forum Discussion

nsinghal's avatar
nsinghal
New Contributor
2 years ago

Passing comma separated values for a property in Data driven test case

Hi,  I am creating a grid data driven test case using Ready API. For one of the properties, I have to pass multiple comma separated values for a particular property in my REST request. I am not g...
  • nmrao's avatar
    nmrao
    2 years ago

    The above generates values without quotes. If that causes any trouble when API is called, then you can try below:

    "taxCodes": ["${= "${Properties#TaxCode}".split(',')*.trim().join(',"') }"],
  • nsinghal's avatar
    nsinghal
    2 years ago

    The later one as I required my text to be enclosed in double quotes. Just made a minor change in join method. Instead of join(',"') I used join('","') to close the double quotes for each string.

    ["${= "${API Data Driven Source#TaxCode}".split(',')*.trim().join('","')}"]