What is the exactly use of Robot framework?
Asked Answered
B

1

6

I'm fascinated towards robots. You know usually it creates our work easy and for web you don't need to go anywhere on links once our robots is initialized on web server.

Let's come to our main question:

What exactly is the use of Robot Framework .. I'm good with Java but not with Python. Can I use it with Java? For what purpose Robot Framework is used for?

I'm good in HTMLUnit. But it can be used to parse the HTML source code and we could also implement it in Java to make source code. But what about Robot Framework?

I googled for 2 hours but couldn't find the exact answers. Please let me know if you want to know any information from me.

Backtrack answered 23/1, 2015 at 13:23 Comment(7)
You mean this framework?Cacoepy
It's a test framework. Please search more next time, this is the user-guide it explains everything you need to know robotframework.org/robotframework/latest/…Tetrad
I have never used it myself, but if you feel comfortable in Java, it seems to be similar to Selenium. Maybe you would like to give that a look.Cacoepy
@Cacoepy I used Htmlunit to parse websites codes.. But i've heards lots of times about Selenium.. Can i create a good bots by using this one? Does it support parsing source codes of html like htmlunit does?Backtrack
I have never used HTMLUnit, so I cannot really say. I have used selenium, and I have been able to process web pages by using XPath and CSS Selectors to select data and read text values. You can also send data and click buttons.Cacoepy
Thanks .. I think i should take a look at Selenium .. Thanks,.. :DBacktrack
@npinti: robot framework is not similar to selenium. There are selenium libraries that can be plugged into selenium, but the framework itself is much, much more than a low level library like selenium.Catling
C
8

Overview

It's main use is to enable writing acceptance tests with a high level of abstraction for software products.

The framework requires less technical skill than programming language-based frameworks, and so can be used by team members who have very little programming experience. For example, an agile team product owner could express acceptance tests using the framework, without having to know the details of how the product is implemented.

On the other hand, because of its keyword-based design, those with a high degree of technical skill can write keywords in their language of choice to test low level functions, and even do unit and integration testing if so desired.

Uses

Because of its flexibility, robot framework can be used to test desktop applications, web applications, mobile applications, and RESTful and SOAP-based services. Because it provides an abstraction layer on top of the physical implementation of the system under test, it is possible to write tests that work cross-platform (ie: the same test case could be used to test both an android and iOS app, or for testing a web app that runs on chrome, firefox and safari).

Although robot framework is often used to test browser-based applications, it has been used to test databases, mobile devices, calculators, and many other things.

Extensibility

One of the great strengths of the robot framework is that it is highly extensible. Many of the features mentioned above are implemented as libraries. For example, you can plug in a library to use selenium to drive a browser. You can plug in a database library to directly access databases. There are libraries to support testing desktop apps, services, and many more.

Example

To illustrate how abstract a robot test case can be, a BDD-style testcase might look -- literally -- like this:

Given I am on the application login screen
When I enter a valid username and password
And I press the "login button"
Then I should be logged in
And my personal dashboard should be displayed

Note: this isn't the only way to write a test. Robot is very flexible, allowing you to choose between BDD (Behavior Driven Development) style, a traditional procedural style, or in a data-driven style.

The framework provides the infrastructure for converting those statements to actionable items. Ultimately they get boiled down to a function call -- either from an external library, or one provided by the development team. Those functions typically are written in python, but can be written in Java, a .NET language, or other languages through an interface, depending on how you actually run the test.

Reporting

In addition to being able to run tests, robot framework provides reports and logs that can be used to visualize the state of the product. Logs provide details of every single keyword and function call, reports show the status of complete suites and test cases, and can provide summary information based on arbitrary tags.

Catling answered 23/1, 2015 at 17:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.