cancel
Showing results for 
Search instead for 
Did you mean: 

Data source Data generator - loading values from file

Highlighted
Contributor

Data source Data generator - loading values from file

I am trying to load my data generator data source from file. 

The data source has two properties.

When I load the file, it puts alll the values as options for both of the properties.

How do I load the data into the different properties?

3 REPLIES 3
Community Hero

Re: Data source Data generator - loading values from file

Hi @lauravachon 

 

If Im understanding - your datasource file has what - 2 columns of data? but despite you creating 2 properties on the datasource - its writing only 1 column's data out to the single property?

 

I struggled using a .txt  file to get the different column's values into separate properties when I was playing around with this a while back - Im sure there is a way - but I found a workaround that was easier.

 

I tried the excel datasource option and it allowed me to have multiple columns of data - each column has an associated property - this successfully extracted multiple values to multiple properties - is that what you need?

 

please see the images below of the spreadsheet and the datasource properties

spreadsheet.PNGDatasource.PNG

 

Hope this helps!

 

cheers,

 

rich

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Community Hero

Re: Data source Data generator - loading values from file

Hey @lauravachon 

 

I did play around and I got the Datasource file option working (with multiple properties) using a .csv file and a txt file

 

Images for correct csv setup with multiple properties are as follows:

csvFileImage.PNGcsvDatasourceStepImage.PNG

 

 

Images for correct txt file setup with multiple properties are as follows:

txtFileImage.PNGtxtDatasourceStepImage.PNG

 

 

Cheers,

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Contributor

Re: Data source Data generator - loading values from file

Thanks rich for your effort.

 

I was trying to load the values for the properties in a datagenerator test step. I gave up after a while and just entered it all manually.

datasource.PNG