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.

Trying to Iterate Through a Table Data Source

Speedy993
Speedy993 Posts: 52

I have a data source table containing a number of rows with a single string column of values. I want my test to navigate to a URL, type into an input field the value of a data source row, and click on a button on the web page. The problem is that the first row value from the data source is always typed into the input field. The test is not iterating through all of the rows of the data source table.
The Scenario has 4 tests within it. The first is to navigate to the web page. The second is to click a radio button. The third is to type the data source value into the input field. And the fourth is to click a button on the screen.
The User Action on the input data source test is to use a Parameterized Value of the table data source and put it into the field on the web page. Unfortunately it is always typing the first row value and not stepping through all rows of the table.
Do I have something defined or configured incorrectly?

Thanks for any assistance!

Answers

  • jakubiak
    jakubiak Posts: 798 admin

    Could you show us a screenshot of the table data source and also the test scenario where the data should be typed? There are a number of things that could be going wrong but it's not clear from what you've shared.

  • Speedy993
    Speedy993 Posts: 52

    Hi jakubiak!
    Here are a few screenshots of my test. This is a very simple application where a name (first/last or first or last) is entered on the screen and a database is searched.
    I have tried specifying the data source name and the data source column name as the parameter but since the data source is only a single column, I suspect that is why I get the same results. I think I am just misunderstanding something or have something configured improperly but do not know what it is.




  • jakubiak
    jakubiak Posts: 798 admin

    Things look like they are configured correctly. To double-check - in the "Rows" section of the table data source, is "All" selected?

  • Speedy993
    Speedy993 Posts: 52

    I guess I cut that off in the image Yes, "All" is selected.

  • Speedy993
    Speedy993 Posts: 52

    Ok, I got this working the way it is supposed to. I think the issue was that I had the data source defined at too high a level and it was trying to loop through other test suites I had and not just the test suite I created the data source for. I moved the table definition into the scenario where it was to actually be used and everything worked as it should. My original thought was to have the data sources all defined in 1 place.
    Thanks for your assistance jakubiak.

  • jakubiak
    jakubiak Posts: 798 admin

    Ok great, thanks for letting us know!