Forum Discussion

lauravachon's avatar
lauravachon
Contributor
6 years ago

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?

  • richie's avatar
    richie
    Community Hero

    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

     

    Hope this helps!

     

    cheers,

     

    rich

     

    • richie's avatar
      richie
      Community Hero

      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:

       

       

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

       

       

      Cheers,

       

      rich

      • lauravachon's avatar
        lauravachon
        Contributor

        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.