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.

Assertion depending on Datasource's value

api_tester
api_tester Posts: 28

Hi Team,

I have added two value assertion for my test case.But I need to validate those assertion depending in the value present in my DataSource's column.
eg : I have a column name SCOPE and has value IN-SCOPE and OUT-SCOPE .So if the value is IN-SCOPE I will have to use a particular assertion and if I have value for SCOPE as OUT-SCOPE I will have to use the other assertion.
Do we have any function in Parasoft to achieve this kind of scenario or we need to to use extension tool to write a code?

Kindly suggest.

Thanks in adv. :smile:

Comments

  • jakubiak
    jakubiak Posts: 813 admin

    You could create a test variable in the test suite that takes its value from the data source. Then you could could put the two assertions into two separate assertor tools and use test suite logic to determine which of the two tools to run based on the value of the test variable.

  • api_tester
    api_tester Posts: 28

    Thanks @jakubiak .I will try that.