Table of contents
1.
Introduction
2.
Looping in Action logic
3.
Repeat statement
4.
While statement
5.
Do-while statement
6.
Frequently Asked Questions
6.1.
What is Action?
6.2.
What is Parameterization?
6.3.
What is a symbolic variable?
7.
Conclusion
Last Updated: Mar 27, 2024
Medium

Looping in Action logic in ACCELQ

Author SHIVANGI MALL
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

The only continuous testing platform that seamlessly automates API and web testing without requiring programmers to write a single line of code is ACCELQ. By automating crucial lifecycle steps, including test design, planning, creation, and execution, ACCELQ helps IT teams of all sizes speed up their testing. We will be learning about Looping in Action logic in ACCELQ in this article.

Looping in Action logic in ACCELQ

Looping in Action logic

A section of the action logic can run more than once, thanks to looping. Looping is supported by accelQ with 3 of the most well-known structures.

Repeat statement

When you need the logic to loop a specific amount of times, use this loop. Repetition occurs exactly the specified number of times and is unconditional. By using "repeat" or "loop" in the new sentence, you can create a repeat loop.

Repeat statement

 

Verifying the content of a grid on a page could be one of the typical examples. Here is an example of such logic.
 

The next example gives you the total number of rows in the grid of search results and confirms that there is a "select" text in column 3 of every row.
 

Repeat Statement

 

Three parameters are supplied when creating a repeat loop.
 

  • start index for repetition -  establishes the initial iteration count.
     
  • end index for repetition -   establishes the final iteration's number.
     
  • iteration tracker index - the current iteration number is tracked by a variable that is set. This variable is used to specify the row number in the table for the verification process in the example above.

While statement

In response to a defined condition, this loop is repeated. Make a distinction between this and the repeat loop, which is always run.
 

You must choose a condition upon which the while loop will continue to run when you are creating one. The loop ends when the condition evaluates to false. You must supply the max-loop count to guarantee that this statement does not enter an infinite loop. Regardless of whether the condition is true or not, the while loop will end when it reaches this maximum number.
 

Here's an illustration. As long as the page has the text "loading...", this logic will wait 2 seconds at a time (up to 120 times).

While Statement

Do-while statement

This is comparable to the While loop, with the exception that the condition is assessed after the loop block's logic has been carried out. Due to the unconditional nature of the initial iteration, this loop will, therefore, always run at least once.
 

When using a while loop, the condition is assessed before the loop block's logic is carried out.
 

To prevent infinite loops, the maximum iteration count is comparable to the While loop.

Frequently Asked Questions

faq

What is Action?

A Context defines an Action as a meaningful test function. For instance, you may be able to take actions like logging in to QBank, requesting a forgotten password, checking the footer links, etc., when you are on the QBank login page (context).

What is Parameterization?

In Action logic, parametrization is the process by which symbolic variables are used in place of hard-coded values. You define and use a placeholder in the logic rather than actual literal values.

What is a symbolic variable?

A string of characters that you designate as a symbol is a symbolic variable. The variable might have different values assigned to it at different times because it is a symbol. You can do the same processing on several sets of data by giving them different values.

Conclusion

We have extensively discussed the Looping in Action logic in ACCELQ in this article. We hope this blog has helped you enhance your knowledge. If you would like to learn more. Check out our articles on AWSAWS Certification, and Ansible vs Puppet. Practice makes a man perfect. To practice and improve yourself in the interview. You can check out Top 100 SQL problemsInterview experienceCoding interview questions, and the Ultimate guide path for interviews.

Recommended Readings:

ThankYou

 

Live masterclass