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.

Execute test only when the data source row value matches

bsaikrishna84
bsaikrishna84 Posts: 66

I have a test with data source having multiple rows. In one of the columns I have YES & NO values where I need to execute the test for that particular row only when the row value matches with YES and skip the row where the value is NO

Is there a way that I can achieve this ?

Tagged:

Comments

  • jakubiak
    jakubiak Posts: 798 admin

    Unfortunately there is not a built-in way to handle this. I would writing a script outside of SOAtest to dynamically create the data source (for example a .csv file) that only has the rows with the YES values. Then when SOAtest reads the data source it will only get the values that were put into the dynamically-created file.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited June 2019

    This is possible. I recently explained how to do this in another post:
    Use data conditionally in a SOAP Client Tool

    I described a case where the test is a SOAP client and the value in the data source column is empty string, but really the same steps apply to any tool and you can test the data source column against any value you want.

  • bsaikrishna84
    bsaikrishna84 Posts: 66

    Wow that's great. I think I could try this and see how this helps in my case. Thank you so much benken.

  • jakubiak
    jakubiak Posts: 798 admin

    Thanks Joe - I learned something!

  • bsaikrishna84
    bsaikrishna84 Posts: 66
    edited June 2019

    I have tried implementing the same benken but didn't work. :(

    I have only two rows in Table where the column name is Check which is holding YES and NO values

    I have mapped the test suite variable and provided condition check at test flow logic when Check == YES

    So usually it should trigger only one row which is having YES

  • bsaikrishna84
    bsaikrishna84 Posts: 66
    edited June 2019

    Got it. Now, its working with the condition match.
    Actually I was triggering test case alone. My bad, I have to trigger test suite once the condition is set.
    This is awsome. This saves lot of time. Thanks benken.

Tagged