nsinghal
2 years 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...
- 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(',"') }"],
- 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('","')}"]