Skip to content

FHE :: Data Looping within Test Scripts

CourseFirst-Hand Experiences of Worksoft SaaS
Module #3.Scriptless Testing with AI-Powered Automation
Lesson #9.Incorporating Flow Control in the Test Scripts
Topic3.Data Looping within Test Scripts
Average Time to Complete10 mins

 Read:



Sub-Topic 1: Explain the generic Use-case.

Sub-Topic 2: As an example, take a Testing Requirement in IPC (Explain a Complex workflow as a challenge and using data loops as a Solution).

Sub-Topic 3: Using “FOR-ENDFOR” Command, Using “WHILE-ENDWHILE” Command
  
Worksoft SaaS provides special constructs that allow for the repetition of instructions or blocks of instructions.

There are two sets of Commands available in Worksoft SaaS that can be used to perform similar action(s) 
  1. "for - endFor": These loops execute for a prescribed number of times, as controlled by a counter or an index, incremented at each iteration cycle.
  2. "while - endWhile": These are based on the onset and verification of a logical condition. The condition is tested at the start or at the end of a loop construct.

 Watch: 



 Following example illustrates the usage of Looping Command(s) 

 Practice Exercises:



 Exercise #: 12

 Explore more at your leisure:


     
  "foreach - endForeach": This is another command which is used as a control flow statement for traversing items in a collection. Foreach is usually used in place of a standard "For" statement. Unlike other "for" loop constructs, "foreach" loops usually maintain no explicit counter; they essentially say "do this to everything in this set", rather than "do this x times".

Feedback and Knowledge Base