Eviware Forum

soapUI => soapUI => Topic started by: KSmith on March 27, 2008, 06:09:48 pm



Title: DataSource problem
Post by: KSmith on March 27, 2008, 06:09:48 pm
Hi
 
I am evaluating SoapUI pro and I would like to know if datasource configuration is dynamic:
 
I currently have a data source step that reads rows from an excel spreadsheet and feeds subsequent steps with data.
 
I would like to use one of the properties from the first data source step (above) to configure another data source step (DataSource and config parameters).

i.e. data from the first spreadsheet contains "another.xls", which will become the file from which the second data source step operates... 

Please let me know the best solution to this problem.

Thanks in advance,
K


Title: Re: DataSource problem
Post by: omatzura on March 27, 2008, 08:26:22 pm
Hi!

Thanks for your interest! This should definitely be possible using property-expansion in the fileName field of the second datasource. So if the first DataSourceStep is called "DataSource 1" and the property containing the filename is called "datafile", you should be able to specify

${DataSource 1#datafile}

as the Excel filename in the second DataSource..

Hope this helps, let me know!

regards,

/Ole
eviware.com


Title: Re: DataSource problem
Post by: KSmith on March 27, 2008, 10:25:03 pm
Hi Ole,

Thank you for the property expansion lesson - it works perfectly!  I am very much enjoying working with your product.

Regards,
Karl


Title: Re: DataSource problem
Post by: zxsoap on June 20, 2008, 03:48:57 pm
Hi Ole,

Is it possible to have each of property response to one sheet in excel file? Yes, how to do it?

I could not able to configure this way. Ex, the request have start_date and end_date. I want to configure in the same excel file which have two sheets and start_date will get data from sheet1 and end_date will have data from sheet2. So far, I have no luck.

Thanks,
zx


Title: Re: DataSource problem
Post by: omatzura on June 23, 2008, 11:34:21 pm
Hi!

hmm.. maybe you could define one DataSource for each sheet (both using the same excel file), and then refer to the corresponding DataSource steps for the start/end_date values?

regards,

/Ole
eviware.com


Title: Re: DataSource problem
Post by: zxsoap on June 25, 2008, 10:09:26 pm
Hi Ole,

How can I refer to the corresponding DataSource steps for the start/end_date values? I have Start_date, End_date on the same Excel file with different sheet, but could not know how to set them up on the script values.

Thanks,
zx


Title: Re: DataSource problem
Post by: omatzura on June 25, 2008, 11:54:41 pm
Hi!

I was thinking like this:

1) Create 2 DataSource steps, both referring to the same file but different sheets and each with their corrsponding properties (start_date and end_date)

2) Refer to these 2 values using standard property-expansion in your request, ie something like:

Code:
<startDate>${DataSource 1#start_date}</startDate>
<endDate>${DataSource 2#end_date}</endDate>

makes sense?

regards,

/Ole
eviware.com