Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Extracting a particular row from DataSource

Options
LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
Hi,

Is there a way i can specify/extract a particular ROW/s from Excel sheet or Table that was specified as a data source (Not all the rows in a specific column as it consideres by default) and assign it to a particular Test?
This will help me in maintaining most of my seed data for different tests in a particular data source.

Regards.

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Hi,

    To restrict the rows used in a Data Source look at the section labeled "Rows" in the data source GUI. There is a radio button for "All" and one for "Range". Select "Range" and you can then specify the range of rows you want to use. For example if you only wanted to use row 2, you would set the range from 2 to 2.

    Josh
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Thx for your respose.

    If i select the range of rows in a datasource as specified, that will be common across all the tests in which i use that data source for a parameter.
    But i would like to use a single data source and select a column in the data source and specify - "in this particular particular column selected i would like to consider only rows say from row5 to row12 for Test1 and say in a different test2 row1 to row 10 is to be used from the same data source."

    That is effectively selecting the column(this is available by default as you specified) and also in that column i would like to consider only particular rows as my seed data for a parameter in a test and a different set of rows for another test from the same data source.

    Regards.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    For a case like this, there are a couple of different options. One would be to break the data source up into two seperate data sources. So from your example, one data source would contain a column with rows 5 to 12 from the original data source and the other data source would contain row 1 to 10 from the original data source. Another option which would allow you to keep the data source in one file without seperation would be to use an external data source (i.e Excell spreadsheet, CSV) and create multiple data sources within SOAPtest pointing to that same file. For your example in this case, lets say you had a file called "Foo.xls". You would create two data sources in SOAPtest and select "Foo.xls" as the seletced data source in both. Then in one datasource you would select the range to be from row 5 to 12 and in the other select the range to be from row 1 to 10. Please let me know if you need further explaination with this.