Get up and running Robot Framework in 10 minutes

Related image


Robot framework is an extensive and widely used test automation framework which (along with RIDE) gives you an easy to use and easy to navigate interface and neat style IDE to its users. It has huge support for a variety of external and internal libraries for keywords support, using which user can develop new high-level keywords using the existing one. Since Robot is an open source verily used framework you can find its detailed documentation from GITHUB ((https://github.com/robotframework/robotframework)) to know more about it. (It’s not just detailed but good to understand as well).

In this article, I’ll share ‘How to setup Robot framework & RIDE IDE to write and execute your testcases in an easy and tabular manner’. To setup and configure the Robot framework correctly you will be needing installation of the following software and tool.
1.       Python.
2.       Iron Python.
3.       Robot Framework.
4.       Element Tree.
5.       RIDE.
6.       WXPython.
Installation of Required tools.
1.       Install and set up Python
Install the latest version of Python (you can download Python from this link), set the installation directory “C:\Python27”, set its environment variables and paths for Python and Python scripts as well.  To set up the environment variables follow the steps below;

a.       Right Click on My Computer Icon.
b.       Click on Properties.
c.       Find Advanced System Settings and Click it.
d.       Click on Environment Variables button.
e.       In System Variables portion find Path Variable click it and click Edit.
f.        Append Paths for python and Python Script as “C:\Python27;C:\Python27\Scripts;”.
2.       Install and setup Iron Python
To set up the iron Python correctly, you must require .NET version 4.0.  Download the setup from its official site ((http://ironpython.net/download/)), and then run and install it in in “C:\ IronPython 2.7”. Append the path for Iron Python and Iron Python scripts in the Environment variable as we have done in the case of python above.
i.e.
Paths for Iron Python and Iron Python Scripts should be “C:\IronPython 2.7;C:\IronPython 2.7\Scripts;”.

3.       Install and Setup Robot Framework
You can download robotframework-3.0 or any latest version from its official site. After extracting the files (in the C: drive) execute the following command at the command prompt.
Note: Open the command prompt same the same directory the setup file is residing. You will get it by Keeping CTRL+ SHIT pressed, right-click anywhere and then select open cmd here.
  


Now execute this command as well,


4.       Install Element Tree
Download and install the latest version of Elementtree-master from this link (http://effbot.org/zone/element-index.htm), I repeat don’t extract all these setup files anywhere but on the C drive itself. Execute the following command from the same directory to install iron python.
Element tree is an API for extracting and manipulating XML, since XML is all about tree-like structure and all we need to do is the manipulation and navigations along its nodes, branches, decedents, children, and subtrees. ElementTree comes in the two implementations one in Python and the second implementation of it is in C. You don’t need to know more about element tree or about the flavors of its implementations but if you want to look into it more, then refer its official site.   



5.       Install RIDE – You need an IDE to write better script on
RIDE is an IDE to write automation scripts in a tabulated and organized manner. Get it download from its official site or better to meet at GIT ((https://github.com/robotframework/RIDE/releases)). The setup will guide you through the installation. Keep the directory path “C:\Python27\” and Installation Directory “C:\Python27\Lib\site-packages\”.
6.       Install WXPython
Download and install WXPython from this link  (https://osdn.net/projects/sfnet_wxpython/downloads/wxPython/2.8.12.1/wxPython2.8-win64-unicode-2.8.12.1-py27.exe/), the setup wizard will let you through the steps. Keep the path “C:\Python27\Lib\site-packages”
WXPython is a cross-platform GUI toolkit for the Python language, which helps users to build interactive python applications for all hybrid platforms (Mac, Unix, Windows) with few modifications. Know more about it from this link ((https://www.wxpython.org/)) but working along with robot framework either or writing test scripts we won’t need to know about it.
Run Test Case – Finally it’s time to roll  
Now, you are all set to write and execute your test scripts in an appropriate and fully configured automation environment. To be precise you will be using RIDE as an IDE to write your test cases there and you will not be interacting with any of the setups we have configured above.  Launch RIDE, open the directory where you have kept your test cases and then start a new journey with smart automation.



Comments

Popular posts from this blog

Continuous Integration With Jenkins for .NET Projects