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

bsaikrishna84bsaikrishna84 Posts: 28

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

Comments

  • jakubiakjakubiak Posts: 502 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.

  • bsaikrishna84bsaikrishna84 Posts: 28

    Thanks jakubiak.

Sign In or Register to comment.