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
Robot Framework Test Automation
Robot Framework Test Automation

Robot Framework Test Automation: Create test suites and automated acceptance tests from scratch

eBook
€8.99 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Robot Framework Test Automation

Chapter 2. Configuring a Test Project

In this chapter, exclusive focus is on the structure and files contained in test. The topic has already been touched upon briefly in the first chapter, but a closer look at them would help set the background for further exploration as tests are the most important feature of the Robot Framework. The following major topics will be covered in this chapter:

  • Creating a Robot Framework test file and a testsuite.

  • Understanding differences in syntax across different file formats used in configuration. Gaining knowledge about the different configuration files.

  • Understanding and utilizing setup and teardown operations

  • Increasing automation through test re-use

We will start by explaining, what a test is and how it can be defined. Different type of tests and common naming conventions along with examples will be explained thereafter. Test file structure and their supported formats will be understood by the end of the chapter.

The Robot Framework makes it very easy to change...

Test naming conventions


Test naming conventions are important for the standardization and coherence of the tests. It also indicative of the quality of tests as the naming and placement of tests; and the use case scenarios indicate their order and relevance, which can be very useful when the tests are maintained in future.

Creating an execution order

In order to name tests, the Robot Framework is very peculiar; it uses the configuration file and folder names to determine the execution order and test naming.

For example, consider the following arrangement of different test files and folders in the test project in the file system:

application/

tests/

Test1.txt

Other tests/

Another test.txt

Running the pybot in the application folder will result in creation of different testsuites in the report based on the order of their presence in the file system. The following screenshot shows the file structure of a Robot Framework test:

After running, the tree command lists out the file/folder...

Test file structure


So far, it has been demonstrated that whitespaces play an important role in configuration files. The test configuration is written in a tabular format with each column having separate elements such as test element. The Robot Framework allows flexibility in specifying the separations among the different columns in a test file as well as supporting different formats for the test files, which you can choose at your discretion. Note that depending upon the file extension; a suitable parser is selected during runtime. Some of the supported formats are as follows:

  • HTML

  • TSV

  • Plaintext

  • Piped text

  • RestructuredText

HTML format

In an HTML format, the HTML is read, which comprises of different tables for different portions of the test configuration. For each table, the first heading element is read and based on this information; the rest of the table is understood. A word of caution! Any data that is outside the recognized table is discarded. You can understand this better with the help...

Test configuration files


As mentioned before, the tests are stored in files and are clubbed in folders that act as test suite for the files. A test file can contain different sections, which can optionally be moved into other files dedicated specifically towards the work of that particular section. Thus reducing the length and complexity of the actual test file, which is helpful if the test size is very large.

The test configuration files apart from the actual test files and folders are:

Suite initialization files

A folder in the Robot Framework denotes a test suite for all the files and subfolders contained in it. As there is no way to specify metadata of the test suite except for the folder name, there is a provision for special files that pertain to the folder in which they are placed. As with specifying a directory as a module in Python, initialization files have to be named as __init__ and their extension can be any valid extensions allowed by the Robot Framework. The format of these files...

Summary


In this chapter, various files involved in the Robot Framework test creation and configuration together with the test naming conventions for different components such as, test suite, test case, and test action were discussed and the execution order management was detailed. As the test file format is quite different from any other test, it was exhaustively discussed as well. The use of variables as well as extra files are also discussed as these promote test code re-use and separate the test contents. Finally, the test environment management through test setup and teardown was discussed, which is essential if the tests require any prior dependency.

This serves as the groundwork for further work over the framework and as the basic syntaxes mentioned here are covered, the test automation and re-use will be discussed in the next chapter that continues from the work that has been covered here in order to automate and re-use existing tests.

Left arrow icon Right arrow icon

Key benefits

  • Create a Robot Framework test file and a test suite
  • Identify and differentiate between different test case writing styles
  • Full of easy- to- follow steps, to get you started with Robot Framework

Description

Testing has traditionally been a part of software development, and has always involved a lot of manual effort. It can be automated with Robot Framework, which offers numerous benefits from cost saving to increased quality assurance in the software delivery. This book will help you to start designing test suites and Automated Acceptance Tests. Helping you to get started with automating acceptance tests, this book will provide a detailed overview of acceptance test management practices and principles. You will also be introduced to advanced techniques that you can use to customize the test suite, along with helpful tips and tricks to extend and leverage it in a wide variety of scenarios. Starting with a detailed explanation of the need for automated acceptance test driven development, this guide will help you with an empty test project creation and execution for proof of concept, and validation of installation. This book will also cover the Robot Framework in detail, and will help you test desktop applications using Java Swing. You will gain an in-depth knowledge of tricky activities, such as setting up a test environment and using it with Selenium. You will also learn about other popular libraries, and how to test network protocols, web services, and databases. This book will cover the entire Robot Framework with real- world practical material to make its content informative and interesting. By the end of this book you will be able to write acceptance tests for desktop and web applications, as well as know how to extend acceptance testing in other scenarios that are commonly devoid of tests, and present the results appropriately.

Who is this book for?

If you are an automation engineer, QA engineer, developer or tester who is looking to get started with Robot Framework, as well as find a standardized testing solution, this book is ideal for you. No prior knowledge of Robot Framework or acceptance testing is required, although a basic knowledge of Python is required for few sections of the book.

What you will learn

  • Create and run a basic test over Robot Framework to validate the setup
  • Customize a test with reusable components and introduce test reuse
  • Identify the different files and tables used in tests
  • Extend the framework by using third party libraries to work with other tools
  • Parameterize the test cases and get data into the tests /color
  • Create derived reports using the report metadata
  • Use external resources to feed data into tests
  • Set up the Robot Framework and run its basic test

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 25, 2013
Length: 98 pages
Edition : 1st
Language : English
ISBN-13 : 9781783283040
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Oct 25, 2013
Length: 98 pages
Edition : 1st
Language : English
ISBN-13 : 9781783283040
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 103.97
Robot Framework Test Automation
€24.99
Building Machine Learning Systems with Python
€41.99
Data Visualization with D3.js Cookbook
€36.99
Total 103.97 Stars icon
Banner background image

Table of Contents

5 Chapters
Getting Started with the Robot Framework Chevron down icon Chevron up icon
Configuring a Test Project Chevron down icon Chevron up icon
Further Test Customization Chevron down icon Chevron up icon
Extending the Framework Chevron down icon Chevron up icon
Generating Reports Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Half star icon Empty star icon Empty star icon Empty star icon 1.8
(18 Ratings)
5 star 0%
4 star 0%
3 star 22.2%
2 star 33.3%
1 star 44.4%
Filter icon Filter
Top Reviews

Filter reviews by




Ray Robinson Sep 16, 2014
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
most of what is contained here can be found in the online docs and although it neatly brings everything together. It's not worth the price.
Amazon Verified review Amazon
marino punturieri Dec 18, 2013
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
This is the first book about Robot Frameworks as per my knowledge.This should be considered a simple and basic recap for any beginner but as some one already noticed it lacks in depth. Some important real life topics like "continuous integration" are left out.I appreciate the effort to put some example for a "real test" like web site automation, but again too few low level mandatory details seem lost.I would recommend it to anyone would like to have a quick and dirty introduction and would not bother to look on several web site to gather all details.Disclaimer: I got a review copy of the book from Packt.
Amazon Verified review Amazon
D. Luu Dec 09, 2013
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
I think some of the reviewers may have been a bit harsh in their reviews, so I'll be one of the few to provide a balanced assessment. However, do note that I've read most of the book but skimmed over parts of it and have not looked at the accompanying source code that you have to download from the internet. Therefore, the review is not a complete review of the whole content of the book including the source code.This appears to possibly be the first book about Robot Framework (excluding the framework's user & quick start guides), which I think is a positive thing regardless of the quality of the book. As a whole, the book is nicely written for someone not familiar with Robot Framework (RF) and for non-technical people. It provides a good introduction about RF, delves into some of capabilities and benefits of RF, and is a good stepping stone to use & learn more about RF. It is a good bridge or companion to the RF project's existing User Guide and Quick Start guide, which provide more technical detail and information not covered by this book. For more advanced coverage of RF, look elsewhere, hopefully there will be such a book to cover that in the future.Having said that, the book does have its downsides. As pointed out by others, there are some typos in the current/first edition of the book, not a whole lot, but a few here and there as I've seen. Understandable, but sadly that these were missed before publication. The organization of the book is decent, but could be improved, and the chapter titles don't reflect well against the actual topics in the chapters, at least from a technical user for what they expect to see based on the title alone as the content vs title doesn't quite fit descriptively. Only by reading the details of the chapter summary at beginning of chapter or in the Preface do you see what the chapter is really about (compared to its title).I also found the book a bit lacking in some areas in terms of subject matter or content. The section about Data Driven testing and Behavior Driven Development (BDD) testing could have benefited from elaboration with some actual test case examples and/or code implementation (in the book, not as external accompanying source code samples). The BDD information I felt was too brief in coverage. In same area, the book mentions "DSL" without actually defining the abbreviation (DSL = Domain Specific Language), which is bad form in technical writing as we don't expect the user to already know abbreviations. The book also mentions RF generically without mentioning which version of RF is being covered at the time of publication/writing.I may be incorrect in assumption, but the author also might not be active with and well informed of the RF user and developer community. I say this because while the book does mention some common & useful test libraries, there are some omissions whether by choice or ignorance. For example: AutoItLibrary (for desktop UI testing with free AutoIt tool), ranorex-robot-library (for desktop UI testing with Ranorex commercial tool) SimpleSikuli (Java test library alternative version of Sikuli integration that was covered in the book), SSH library. Another thing the author missed was the fact that the Remote Library interface/API of RF provides for much more than what was mentioned in the book, particularly that it can be used to interface RF to other languages, tools, platforms not natively supported by RF (Python/Jython/IronPython) and as such to execute tests in those areas as well. For example: (pure/native) Java (as opposed to through Jython), pure .NET as opposed to via IronPython, Ruby, Perl, PHP, and more. Furthermore, the book mentions that only the Python and Ruby versions of the (generic) remote server are implemented for users to make use of for remote libraries, and for anything else, one would have to create it themselves, though it is not necessarily hard to do so. But in reality, as of this review (and at least about 1-2 years before it), there have been other (generic) remote libaries server implementations already available (Java, .NET/C#, Perl, PHP, Clojure, node.js), so it is truly really easy to use remote libraries and for other platforms. The author should have also put in some references that for more technical information and whatever not covered by the book, the reader can look to the RF user guide and discussion with the RF user/developer community via the online Google Groups, providing the links to them with the references.So given all this, to an (or a more) advanced/technical user, the book is not very helpful, and for what you can get for free with online searching, the RF user/developer community discussion group, and the framework's existing user guide, the price of the book may also seem extravagant. But I think it is a useful book that can be used to help try and convince upper management, non-technical business stakeholders to adopt RF, etc.I'd like to end the review with some positive points at least. Unless one is well familiar with RF, there are some useful things that can be learned or be reminded of from this book. For me, I hadn't noticed that RF offered a randomization feature when executing test cases and test suites. And the coverage of the test configuration/data files like variable files was a helpful reminder to me. Last, I like the fact (at least what is stated in the book) that Packt publishing has a "Packt Open Source Royalty Scheme, by which Packt gives a royalty to each Open Source project about whose software a book is sold". Which would mean RF should get monetary donations from Packt for each copy of this book bought by somone. I wonder what happens in the case of refunds/returns by customers though. Does that get removed from the donation amount or Packt still passes that on to OSS projects for the "initial" sale.Maybe a future edition of the book will be more improved. And/or look forward to seeing an advanced coverage version of the book for RF for more advanced/technical readers.
Amazon Verified review Amazon
Amazon Customer Dec 09, 2013
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
The book is a quick and easy 100 pages read that can be useful to those who find the user guide a bit to dry.First chapter helps go through the installation steps but fails at giving a clear picture of Robot Framework ecosystem: a diagram shows a “testing tool” component being the one that actually target the SUT while Robot Framework is more on the user end side as a coordinator. This is just one way to use Robot (a way that is later described more in details in section about Robot+Selenium and Robot+Sikuli). But Robot can be used to test directly the SUT through its native libraries or some custom libraries.Second chapter is quite clear about the different file format and the organization of the test portfolio. Third chapter treats the actual creation of test cases with some data about syntax and libraries, but it lacks some examples going from the easiest to more complex cases. Chapter four discuss Robot association with other testing tools (like mentioned before) and finally the last chapter helps generating standard and custom reports.A topic that is not covered is who is the “ideal” Robot Framework user. It is implied in chapter three that “developer and stakeholders” will collaborate in writing the tests. My experience is rather than a tool like Robot Framework is a very good fit for a QA/testers team that is distinct from dev and stakeholders. For such a team it makes sense to have a specific tool/DSL for testing rather than coding the functional/acceptance tests in the langage of the product.Globally though the book is a good read, it fails at being a real “missing manual” compared to what the User Guide already offers. The book would maybe have benefit from taking an alternate approach with much more example, like a cookbook, and more experience from the field. Anyway, thanks to Sumit and Packt for the effort in sharing some knowledge about Robot Framework!
Amazon Verified review Amazon
DJ Nov 22, 2013
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
The "In Detail" description of this book is extremely well written, deceivingly so.I would not use words like "in depth" to describe this book.Upon receipt I flipped through the pages briefly, looked at a couple of the examples, and immediately boxed the book for return.There might be a few hints, tips, and tricks, but there's really not much beyond a very basic primer. You could easily read the robot framework documentation online in a couple hours, do a few google searches, and you'll be well beyond what this book has to offer.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.