Number of iteration

Ranorex Spy, Recorder, and Studio.
BCTest
Posts: 88
Joined: Tue Jun 03, 2014 10:15 am
Location: Hamburg, Germany

Number of iteration

Post by BCTest » Tue Sep 02, 2014 9:05 am

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?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Number of iteration

Post by Support Team » Thu Sep 04, 2014 1:01 pm

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)
.
Image