Page 1 of 1

Number of iteration

Posted: Tue Sep 02, 2014 9:05 am
by BCTest
Just a simple question but I haven't found the answer in the forum yet - maybe the wrong tags?

We have a data-driven-test with five iterations which adds new data. In the first iteration an option should be selected which should be checked in the following iteration:
1st Iteration: set option to specified value
2nd to 5th Iteration: check the value of the iteration

How can I receive the actual number of the iteration?

Re: Number of iteration

Posted: Thu Sep 04, 2014 1:01 pm
by Support Team
Hi BCTest,[language=][/language]

In order to get the number of the current iteration you can use the following line of code:
int currentIteration = Ranorex.Core.Reporting.TestReport.CurrentTestIterationActivity.Index;
regards,
Markus (S)