Robot Framework

Robot framework is another python framework which is used to do the automation testing over the network or testing of the website with predefined qualities like checking of the login with username and password

There are builtin libraries like “Remote ,Telnet, Date time, Dialogs , Operating System & Process “

Test Suit Results

Every Test suite results are shown in the form of the xml or html & log format documentation.

How To implement Robot

The robot framework files having the .robot extension and these are will be triggered by the command in command line like robot filename.robot

Example files and structure:

example.robot file structure like below

*** Settings ***
Documentation Example suite
Suite Setup Do Something ${MESSAGE}
Force Tags example
Library SomeLibrary

*** Variables ***
${MESSAGE} Hello, world!

*** Keywords ***
Do Something
[Arguments] ${args}
Some Keyword ${arg}
Another Keyword

Writing the custom PYTHON files and import into robot then using

Let us take the one simple python file which is consisting of the one class with the functions,

xtest.py

Class Xtest:
def __init__(self, **kwargs):
print(“keyword arguments are :”,kwargs)

def make_connection(self,):
print(“make connection function is called …..”)

if “__name__” == __main__:
xtest = Xtest(name=’venkatesh’, relation= ‘single’)

How to import xtest.py to .robot file & how to access the class and functions:

There is one condition which is using for the use of custom python files importing (i.e) making the files available in the python path , like what are the default libraries present in the robot are already present in the python path ,so the libraries are directly imported without doing any extra work. Make a .sh file which will export the your current directory path to python path , remember this export only available in this shell only.

environment.sh

export LOGSPATH=”${PWD}/logs”
export PYTHONPATH=”${PYTHONPATH};${PWD}”
echo $PYTHONPATH

then change in the example.robot file:

*** Settings ***
Documentation Example using the space separated plain text format.
Library OperatingSystem
Library xtest.Xtest name=venkatesh relation= single WITH NAME remote

*** Variables ***
${MESSAGE} Hello, world!
# list variables declaration
@{names} venky snehitha ravi akash srujan

*** Test Cases ***
Check connection
[Documentation] Example test to check class is accessible or not
${ret} remote.make_connection

you can declare multiple test cases like above and these are executed by one by one

RESULTS:

RESULTS IN .HTML FORMATS

Introduce Yourself (Example Post)

This is an example post, originally published as part of Blogging University. Enroll in one of our ten programs, and start your blog right.

You’re going to publish a post today. Don’t worry about how your blog looks. Don’t worry if you haven’t given it a name yet, or you’re feeling overwhelmed. Just click the “New Post” button, and tell us why you’re here.

Why do this?

  • Because it gives new readers context. What are you about? Why should they read your blog?
  • Because it will help you focus you own ideas about your blog and what you’d like to do with it.

The post can be short or long, a personal intro to your life or a bloggy mission statement, a manifesto for the future or a simple outline of your the types of things you hope to publish.

To help you get started, here are a few questions:

  • Why are you blogging publicly, rather than keeping a personal journal?
  • What topics do you think you’ll write about?
  • Who would you love to connect with via your blog?
  • If you blog successfully throughout the next year, what would you hope to have accomplished?

You’re not locked into any of this; one of the wonderful things about blogs is how they constantly evolve as we learn, grow, and interact with one another — but it’s good to know where and why you started, and articulating your goals may just give you a few other post ideas.

Can’t think how to get started? Just write the first thing that pops into your head. Anne Lamott, author of a book on writing we love, says that you need to give yourself permission to write a “crappy first draft”. Anne makes a great point — just start writing, and worry about editing it later.

When you’re ready to publish, give your post three to five tags that describe your blog’s focus — writing, photography, fiction, parenting, food, cars, movies, sports, whatever. These tags will help others who care about your topics find you in the Reader. Make sure one of the tags is “zerotohero,” so other new bloggers can find you, too.

Design a site like this with WordPress.com
Get started