nsinghal
9 months agoNew Contributor
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...
- 9 months 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(',"') }"],
- 9 months 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('","')}"]