Book Image

Robot Framework Test Automation

By : Sumit Bisht
Book Image

Robot Framework Test Automation

By: Sumit Bisht

Overview of this book

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.
Table of Contents (12 chapters)

A small exercise


To demonstrate the Robot Framework, we will create a simple dummy application as follows:.

  1. Create a folder named simpleapp, this will serve as the application root folder.

  2. Inside this, create a folder named testsuites, this will contain all the test configuration files.

  3. Within the testsuites folder create a file, Test_Case_1.txt, with the following contents:

    ***Test Cases***
    
    First Test Action  log  this is a basic test

    Note

    Note that there are two spaces before and after the log keyword.

  4. Now run the project by calling Pybot script and passing the testsuites folder as an argument. You should get something similar to the following screenshot:

This confirms that the project has run successfully. You can view the results and log from generated HTML pages and perform future calculations over the data by using the XML file.

As we used a simple log statement, you get a logged message in the out log, as shown in the following screenshot:

The generated XML is also easy-to-read (as shown in the following screenshot), which can then be used by any other external tool as an input parameter—thereby reducing the human intervention between different stages of testing if this process is also automated.