How to data bind test case / smart folder's iteration count

Ask general questions here.
tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

How to data bind test case / smart folder's iteration count

Post by tvu » Wed Aug 30, 2017 7:33 pm

Is there a way to data bind a test case or smart folder's iteration count? I would like to data bind this value to a parameter in a CSV data source.

For example, I would have a test case structure like this:

Code: Select all

test case (bound to CSV data source)
    * smart folder 1
    * smart folder 2
    * smart folder 3 (bind this smart folder's iteration count to a parameter from the CSV data source from the top level test case)
Thanks in advance.

User avatar
qwertzu
Posts: 284
Joined: Wed Jan 25, 2017 11:08 am

Re: How to data bind test case / smart folder's iteration count

Post by qwertzu » Fri Sep 01, 2017 11:59 am

Hello,

I´m afraid, it is not possible to bind the iteration count property to a parameter, since it seems like it is generally not possible to set the iteration count during run time.

regards,
qwertzu

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: How to data bind test case / smart folder's iteration count

Post by tvu » Fri Sep 01, 2017 5:34 pm

Thanks qwertzu,

I figured it wasn't possible. Guess, I'll just data bind that smart folder to a different CSV data source. I was just trying to avoid it because it seemed a little silly to have a separate CSV just to control the iteration count.

Vaughan.Douglas
Posts: 254
Joined: Tue Mar 24, 2015 5:05 pm
Location: Des Moines, Iowa, USA

Re: How to data bind test case / smart folder's iteration count

Post by Vaughan.Douglas » Wed Sep 06, 2017 12:45 pm

There are a number of threads in the forums that provide examples on how to get the iteration count. This is just one example. You could use something like that to get the iteration number and bind it to a parameter. Then use that parameter as part of a conditional execution on a test case/smart folder. So in effect, execute when iteration count > 2 or something.

All in all this doesn't seem like the most clean and clear way to design a test case; if/when you dataset changes you're going to have to adjust this condition. However you may have situations that make this the best possible solution.
Doug Vaughan