LogoLogo
  • About SimplifyQA
  • Get Started with SimplifyQA
    • Agile & Non-Agile Framework
    • OS Support
    • SimplifyQA Hosting
      • On-premise Installation Guide
        • Pre-requisites
        • Installation Guide
      • Support and Resources
      • Training and Onboarding
    • Explore SimplifyQA for your Application Lifecycle Management
  • SimplifyQA Installation & Setup
    • Setup QAWizard
    • Register QAWizard
    • Setup Android Device
      • How to enable settings in android device?
      • How to register android device?
      • Setup emulators on Android Studio for automation in SimplifyQA
    • Setup iOS Device
      • How to setup iOS device in Apple Developer Account?
      • How to register iOS device?
  • Get to know your Workspace
    • Blueprint of SimplifyQA
    • Key Terminologies
    • Search/Global Search
      • How to use global search?
      • How to use advance search?
      • How to use column sort?
      • How to use column filters?
      • Add or remove columns
    • Rich Text Editor
    • Import & Export
    • Add Attachments
    • Add Linkages
    • Add Comments
    • Manage Cards in board view
    • Configure Watchlist
    • Track Edit History
    • Hierarchy Tree
  • Admin Controls & Configurations
    • Manage Projects & Users
      • Create Project and Invite Users
      • Project Settings
        • Create and Manage Custom Fields
      • Grant Admin Privilege to User
      • Invite/Add Users to Team
      • User Directory and Access Control
      • Configure Page Layout
      • Manage Roles and Privileges
      • Configure Auto-logging of Defects
    • Configure your clients
    • Password settings
  • Release & Sprints
    • Introduction to Releases
    • Create & Manage Release & Sprint
    • Start & Close a Sprint
  • Create and Manage your Requirements
    • Introduction to Requirement Management
    • Create & Manage Epic
    • Create & Manage Features
    • Create & Manage User Stories
  • Introduction to Test Management in SimplifyQA
    • Create a Manual Test Case in SimplifyQA
    • Create an Automation Test Case in SimplifyQA
    • Learn API Testing in SimplifyQA
      • Create an API Test Case in SimplifyQA
      • Quick Test the API
      • Validating API Responses
      • Understanding API Parameterisation
      • Save API Response Data
      • Achieve Data flow for E2E Testing
    • Create Hybrid Test Case in SimplifyQA
    • Leverage Re-usability in your Tests
    • Organise your Test Cases
    • Linking a Test Case to User Story
    • Linking a Test Case to Defect
    • Version Control your Test Case
    • Create a Copy of your Test Case
    • Copy Test Case to different Project
    • Conditional Statements
      • Decision Making Statement
      • Looping Statement
      • BREAK & CONTINUE Statement
    • Supported Actions
    • Utilising Mobile Inspector in SimplifyQA
  • Introduction to Script-less Recording of Test Case
    • Record a Web Test Case in SimplifyQA
    • Record an Android Test Case in SimplifyQA
      • Record an Android Test Case
    • Record Functions in SimplifyQA
    • Understand Object Recognition Mechanism & Self Healing in SimplifyQA
  • Test Data Management
    • Work with the Formulas to Optimise Test Data
    • Import and Export Test Data Sets
  • Introduction to Object Repository
    • Capture Objects for your Tests
    • Organise your Test Objects
    • Parameterise your Test Object Properties
  • Introduction to Parameters
    • Various Types of Parameters
    • Create and Utilise Parameters in your Test Case
    • Understanding Runtime Parameters
  • Defect Management
  • Marketplace
    • Integration with Project Management Tools
      • Integrating SimplifyQA with Jira
        • Configure Web-hooks
        • SimplifyQA Setup for Integration
          • Setup your Account for Jira Integration
          • Configuration in SimplifyQA Admin
          • Steps to Generate a Jira API Token
          • Steps to create SimplifyQA token
          • Steps to get Jira Account ID
          • Synchronisation Functionality Between SimplifyQA and Jira
          • Analyse Logs for Data Synchronisation
        • Mapping Fields for Issue Types
        • Viewing SimplifyQA Test Cases in Jira
  • Legal Documents
    • End-User License Agreement
Powered by GitBook
On this page
  • Types of Looping Statements in SimplifyQA
  • FOR Loop
  • While Loop
  • Do-While Loop
  • Conclusion
  1. Introduction to Test Management in SimplifyQA
  2. Conditional Statements

Looping Statement

Looping statements in SimplifyQA allow users to repeat a set of test steps multiple times until a specific condition is met. This is useful when testing scenarios that require iterative execution, such as validating multiple inputs, handling dynamic UI elements, or automating repetitive tasks.

Types of Looping Statements in SimplifyQA

SimplifyQA supports the following looping mechanisms:

  1. FOR Loop

  2. WHILE Loop

  3. DO-WHILE Loop


FOR Loop

FOR Loop is used when the number of iterations is known beforehand. It allows users to execute a test case for a defined number of times.

Example:

  • Suppose we need to create 5 user accounts in a web application.

  • FOR Loop will repeat the account creation steps 5 times.

How to add FOR Loop in SimplifyQA?

  1. Navigate to the test case and click on "Add Step" Dropdown.

  2. Choose the 'FOR Loop' block.

  3. Click on the condition icon to define the condition and parameters.

  1. Define a loop count.

  2. Specify the test steps to execute in each iteration.

  3. The loop terminates after the defined iterations are complete.

In the provided interface for adding conditions for a For Loop in SimplifyQA, the following parameters need to be configured:

  1. Initialisation

  • Parameter: This is where you define the starting point of the loop. Usually, you initialise a loop variable.

  • Operator: Set this to "equal to" (=) as you assign an initial value to the loop variable.

  • Parameter/Value: Enter the starting value for the loop (e.g., i = 0).

  • Description: Provide a brief description of the purpose of this initialisation step, such as "Initialise the loop counter."

  1. Condition

  • Parameter/Object: Define the loop variable or object being evaluated (e.g., i). Type '#' to select object and '/' to select parameter.

  • Operator: Specify the condition that must be true for the loop to continue.

Additional Information

Types of comparison operators supported are:

  • Equals to (==)

  • Not Equals to (!=)

  • Greater than (>)

  • Less than (<)

  • Greater than or equals to (>=)

  • Less than or equals to (<=)

  • Parameter: Set the comparison value (e.g., 10 if the loop should run until i is less than or equal to 10).

  • Condition: Choose a logical operator (e.g., AND, OR) if combining multiple conditions.

  • Description: Add context for this condition, such as "Run until the counter reaches 10."

  1. Increment/Decrement

  • Parameter: Select the loop variable (e.g., i).

  • Inc/Dec: Choose whether the loop variable increments (e.g., i++) or decrements (e.g., i--) after each iteration.

  • Description: Provide a short explanation, such as "Increment the counter by 1."


While Loop

The While Loop is used when the number of iterations is not known beforehand and depends on a condition being met.

Example:

  • Checking if an email verification code appears in an inbox.

  • The loop will continue checking until the verification code is received.

How to add WHILE loop in SimplifyQA:

  • Set a condition for the loop.

  • If the condition remains true, the loop continues execution.

  • The loop exits once the condition is false.

For a While Loop, you need to define a condition that will be checked before each iteration. The loop will continue executing as long as the condition remains true.

Parameters to be Added for a While Loop:

  1. Parameter (Loop Condition)

    1. Define the variable or parameter that controls the loop.

    2. Example: LoginStatus, PageLoad, or RetryCount.

  2. Operator

    1. Choose a logical comparison operator:

      1. equal to (=) → Runs while a parameter equals a specific value.

      2. not equal to (!=) → Runs while a parameter does not equal a specific value.

      3. greater than (>) / less than (<) → Runs while the value meets the condition.

    2. Example: RetryCount < 5 (loop will run while RetryCount is less than 5).

  3. Parameter/Value

    1. Set the value to be compared against.

    2. Example: true (for a flag) or 5 (for a numeric condition).

  4. Description

    1. Provide a brief explanation of the loop's purpose.

    2. Example: "Retry login until successful" or "Wait for page load."

  5. Condition Logic (AND/OR)

    1. Choose whether additional conditions should be combined using:

      1. AND → The loop will continue only if all conditions are met.

      2. OR → The loop will continue if any condition is met.

    2. Example: LoginStatus != Success AND RetryCount < 5.

Example Use Case:

If you are waiting for a process to complete before proceeding, the parameters would be:

  • Parameter: ProcessStatus

  • Operator: not equal to

  • Value: Completed

  • Description: "Wait for process completion"

  • Condition: AND


Do-While Loop

The Do-While Loop ensures that the test steps execute at least once before checking the condition.

Example:

  • Navigating through multiple pages in a table until the required data appears.

Use Case Scenario: Automating a Login Attempt Until Success

Scenario: A tester needs to log in to an application, but the login process is unreliable. The test case should keep trying until login is successful or a timeout occurs.

Steps in SimplifyQA:

  1. Use a While Loop to repeatedly attempt login.

  2. Verify if the login is successful.

  3. If not successful, retry the login attempt.

  4. Exit the loop once the login succeeds or the maximum retries are reached.

Conclusion

Looping statements in SimplifyQA enhance automation by allowing repetitive execution of test steps efficiently. By using For Loops, While Loops, and Do-While Loops, testers can automate scenarios that require iteration and validation across multiple test runs.

PreviousDecision Making StatementNextBREAK & CONTINUE Statement

Last updated 28 days ago