cancel
Showing results for 
Search instead for 
Did you mean: 

Datasource Loop from exel file to JSON body request

SOLVED
Highlighted
Occasional Contributor

Datasource Loop from exel file to JSON body request

Hello, 

 

im trying readyapi 2.6.0 using free trial, 

i was able to read data (exel) from DataSource which countains the mandatory values to make a json object for my post request,

now i need to use these values in the json body of the request,

any help would be really apperciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Occasional Contributor

Re: Datasource Loop from exel file to JSON body request

If you right click on the paramater you want to work you and select Get Data, you can select the properties from the excel file. Or you can do it manually with ${dataSourceName#dataSourceProperty}.

 

For more details on how property expansion works you can check out this document:

https://support.smartbear.com/readyapi/docs/testing/properties/expansion.html

4 REPLIES 4
Occasional Contributor

Re: Datasource Loop from exel file to JSON body request

If you right click on the paramater you want to work you and select Get Data, you can select the properties from the excel file. Or you can do it manually with ${dataSourceName#dataSourceProperty}.

 

For more details on how property expansion works you can check out this document:

https://support.smartbear.com/readyapi/docs/testing/properties/expansion.html

Occasional Contributor

Re: Datasource Loop from exel file to JSON body request

So it's possible to write a body for a request like this ??

 

{
"name" : ${DataSource#Name}
}

 

because im getting an error while trying it like this

Occasional Contributor

Re: Datasource Loop from exel file to JSON body request

Some strings will require quotes around the property, have you tried putting quotes around the property?

"${DataSource#Name}"

Occasional Contributor

Re: Datasource Loop from exel file to JSON body request

it works thank you so much !

New Here?
Join us and watch the welcome video:
Top Kudoed Authors