Reply
Contributor
LagunaBob
Posts: 14
Registered: 08-30-2008
0

Does iTest support looping?

Hi

 

I want to ping every device in a subnet. I do not want to create 255 steps in my testcase to do this. Is there a simple loop that can help me do this?

 

LagunaBob

Contributor
teksolver1
Posts: 16
Registered: 08-30-2008

Re: Does iTest support looping?

Hi LagunaBob

 

iTest supports three types of looping:

  1. for
  2. foreach
  3. while

A simple testcase snippet for your ping problem is shown in the following image:

 

ping-loop.JPG
Contributor
delta67
Posts: 25
Registered: 08-30-2008

Re: Does iTest support looping?

BTW - I found this neat little shortcut to wrap a set of statements with a for or while or if statement. This made it easy for me to learn iTest syntax for these statements.

 

  • Select your steps in the testcase.
  • Right click on the selected steps and a context menu pops up.
  • Select "Wrap In -> for loop" option and your statements will be surrounded by a for loop.


 

 

wrap.jpg