Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
15 years ago

Disable row in datasource grid

Hello,
Would it be possible to add some marker for disabling a row in datasource grid view. I don't necessarily want to delete some values.

Ali

8 Replies

  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    Maybe there should be DataSource increment event  that could hold a script that could control whether to skip the row or not, according the the values in the row. Then you could have a "marker" column to turn each row on or off...
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    Well, since you are listening... it would be nice to be able to have multiple DataSource Loop steps for a single DataSource; the loop would repeat while a particular property is unchanged, allowing grouping of test steps.
  • Hi!

    that sounds interesting.. can you elaborate? Would we extend the datasource loop configuration somehow?

    regards!

    /Ole
    eviware.com
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    Yes, say you could add a drop down with the names of properties in the DataSource. The loop would continue until the value of the property changed (or data ran out!), at which point it would fall through to the following test step. At some point there could be another Loop step which was watching a different property, or just for the end of data (like the current Loop step.)

    I guess if you added a Loop event for code it would be more generic; then we could loop or not based on any property or combination of properties.
  • Hi!

    ok.. well.. the logic in the DataSource Loop step is pretty simple, so you could roll your own in a script step. The following does exactly the same:

    def dataSourceStep = testRunner.testCase.getTestStepByName( dataSourceStep )
    if( dataSourceStep.next( testRunner, context ) )
    {
        testRunner.gotoStepByName( targetStep );
    }


    Is this something you could use for customization?

    regards!

    /Ole
    eviware.com
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    Yes, that would certainly work, thanks.

    I thought the idea for watching a property for changes would allow someone to get the effect without any coding.
  • Definitely !

    The script above can serve as the start for more elaborate custom-looping :-)

    /Ole
    eviware.com