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.

How to iterate to get column count and each column name from Datasource (DS as Table)

bsaikrishna84 Posts: 66

I was trying to write a piece of java code to loop thru each column and respective values.
Using context i could see that i can read all the values (using context.getValues) of one column or can get one value using (context.getValue). However, I would need to know how do I read the coulmn count and their names ?
So that i can get a list of column names and can loop thru each column to get value ?
If some one could answer this , it will help me in one of the scenarios for our testing


  • jakubiak
    jakubiak Posts: 795 admin

    The SOAtest scripting API does not allow you to get the column names as you desire. If this is something you need to do, I would recommend changing your data source type from table to something else like CSV. Then you could write your custom code to parse the column names out of the CSV.

  • bsaikrishna84
    bsaikrishna84 Posts: 66

    Thanks jakubiak.