masteriti
6 years agoNew Contributor
Data Driven Tests with variable Assertion
Hello,
I'm creating data driven tests and ran into the following scenario: For each test case, I need to test for the presence of a specific elements in a list. The issue is that for some cases I'm looking for a single element, for others I have 2 or more elements to test. I could seperate out test cases that have 1, 2 etc. assertions, but I'm wondering if theres a way to run all these test in a single test case. For example, is there a way to activate an assertion if there is a value present in my data file?
Thanks!