Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Robot Framework Test Automation

You're reading from   Robot Framework Test Automation Create test suites and automated acceptance tests from scratch

Arrow left icon
Product type Paperback
Published in Oct 2013
Publisher Packt
ISBN-13 9781783283033
Length 98 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Sumit Bisht Sumit Bisht
Author Profile Icon Sumit Bisht
Sumit Bisht
Arrow right icon
View More author details
Toc

Internal re-use


As mentioned earlier, repetition within the single test constitutes test re-use internally. Note that the data, if any, involved in different instances of the iterations might come from outside, but the repetition only occurs within the test action.

Loops and flow control

Having gained a good background of the syntax of writing a test, it is time to move on to the most common and convenient way of iteration, that is, a loop. Robot Framework solves this problem through the use of Python styled for loops, but that's easily understandable for the uninitiated as well.

It follows a straightforward syntax, the loop is started with FOR which is a special keyword. This is followed with a variable that is present within the loop. This variable is followed by a mandatory IN statement. This is followed by the variable or a collection over which the for loop is to run. Like Python loops, the subsequent statements are indented by a single space. As soon as the indentation stops, it is assumed...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image