Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Robot Framework Test Automation

You're reading from  Robot Framework Test Automation

Product type Book
Published in Oct 2013
Publisher Packt
ISBN-13 9781783283033
Pages 98 pages
Edition 1st Edition
Languages
Author (1):
Sumit Bisht Sumit Bisht
Profile icon Sumit Bisht
Toc

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.

You have been reading a chapter from
Robot Framework Test Automation
Published in: Oct 2013 Publisher: Packt ISBN-13: 9781783283033
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 €14.99/month. Cancel anytime}