All Projects → robotframework → RobotDemo

robotframework / RobotDemo

Licence: other
Robot Framework demo

Programming Languages

python
139335 projects - #7 most used programming language
RobotFramework
109 projects

Projects that are alternatives of or similar to RobotDemo

robotframework-ConfluentKafkaLibrary
Robot Framework keyword library wrapper for python confluent kafka
Stars: ✭ 20 (-72.22%)
Mutual labels:  robotframework
netascode
This repo contains an example of the virtual network of a fictitious company which you can use to play and to learn network automation. Public repository for Network as Code. NaC model.
Stars: ✭ 36 (-50%)
Mutual labels:  robotframework
robot-framework-docker
Docker image to run robot framework acceptance testing in a docker container
Stars: ✭ 24 (-66.67%)
Mutual labels:  robotframework
robotframework-seleniumtestability
Extension for SeleniumLibrary that provides manual and automatic waiting for asyncronous events like fetch, xhr, etc.
Stars: ✭ 34 (-52.78%)
Mutual labels:  robotframework
winregistry
Tiny Python library aimed at working with Windows Registry
Stars: ✭ 16 (-77.78%)
Mutual labels:  robotframework
robotframework-robocop
Tool for static code analysis of Robot Framework language
Stars: ✭ 112 (+55.56%)
Mutual labels:  robotframework
PythonLibCore
Tools to ease creating larger test libraries for Robot Framework using Python
Stars: ✭ 46 (-36.11%)
Mutual labels:  robotframework
WebDemo
Robot Framework web testing demo using SeleniumLibrary
Stars: ✭ 161 (+123.61%)
Mutual labels:  robotframework
robotframework-excel
Robot-framework auto-test excel
Stars: ✭ 15 (-79.17%)
Mutual labels:  robotframework
metadatamanagement
Metadatamanagement (MDM) - Data Search for Higher Education Research and Science Studies
Stars: ✭ 21 (-70.83%)
Mutual labels:  robotframework
robotframework-zoomba
Extended Robot Framework libraries to make testing GUI, REST/SOAP API, Mobile, and Windows Desktop easier.
Stars: ✭ 121 (+68.06%)
Mutual labels:  robotframework
robotframework-debuglibrary
A debug library for RobotFramework, which can be used as an interactive shell(REPL) also.
Stars: ✭ 96 (+33.33%)
Mutual labels:  robotframework
botcity-framework-core-python
BotCity Framework - Python
Stars: ✭ 28 (-61.11%)
Mutual labels:  robotframework
awesome-testing
Software Testing for QA.
Stars: ✭ 48 (-33.33%)
Mutual labels:  robotframework
robotframework-puppeteer
Puppeteer Web testing library for Robot Framework
Stars: ✭ 33 (-54.17%)
Mutual labels:  robotframework
robot-email-template
Email template for Robot Framework test results
Stars: ✭ 19 (-73.61%)
Mutual labels:  robotframework
robotframework-historic
Robotframework-historic is a free, custom html report which provides historical robotframework execution results by storing execution results info in MySQL database and generate's html reports (charts / statistics) from database using Flask.
Stars: ✭ 70 (-2.78%)
Mutual labels:  robotframework
robotframework-aristalibrary
Robot Framework library for Arista EOS
Stars: ✭ 14 (-80.56%)
Mutual labels:  robotframework
page-modeller
⚙️ Browser DevTools extension for modelling web pages for automation.
Stars: ✭ 66 (-8.33%)
Mutual labels:  robotframework
robotframework-imagehorizonlibrary
Cross-platform Robot Framework library for GUI automation based on image recognition
Stars: ✭ 67 (-6.94%)
Mutual labels:  robotframework

Robot Framework Demo

Robot Framework is a generic open source test automation framework. In addition to introducing Robot Framework test data syntax, this demo shows how to execute test cases, how generated reports and logs look like, and how to extend the framework with custom test libraries.

Downloading demo package

To get the demo, you can either download and extract the latest package from the GitHub or checkout the source code directly. As a result you get RobotDemo directory with several files.

Example test cases, test library used by them, and generated results are available also online. Therefore, you do not need to download the demo if you are not interested in running it yourself.

Demo application

The demo application is a very simple calculator implemented with Python (calculator.py). It contains only business logic and no user interface. You cannot really run the calculator manually.

Test cases

The demo contains three different test case files illustrating three different approaches for creating test cases with Robot Framework. Click file names below to see the latest versions online.

keyword_driven.robot

Example test cases using the keyword-driven testing approach.

All tests contain a workflow constructed from keywords in CalculatorLibrary.py. Creating new tests or editing existing is easy even for people without programming skills.

The keyword-driven approach works well for normal test automation, but the gherkin style might be even better if also business people need to understand tests. If the same workflow needs to repeated multiple times, it is best to use to the data-driven approach.

data_driven.robot

Example test cases using the data-driven testing approach.

The data-driven style works well when you need to repeat the same workflow multiple times.

Tests use Calculate keyword created in this file, that in turn uses keywords in CalculatorLibrary.py. An exception is the last test that has a custom template keyword.

gherkin.robot

Example test case using the gherkin syntax.

This test has a workflow similar to the keyword-driven examples. The difference is that the keywords use higher abstraction level and their arguments are embedded into the keyword names.

This kind of gherkin syntax has been made popular by Cucumber. It works well especially when tests act as examples that need to be easily understood also by the business people.

As you can see, creating test cases with Robot Framework is very easy. See Robot Framework User Guide for details about the test data syntax.

Test library

All test cases interact with the calculator using a custom test library named CalculatorLibrary.py. In practice the library is just a Python class with methods that create the keywords used by the test cases.

Generated library documentation makes it easy to see what keywords the library provides. This documentation is created with Libdoc tool integrated with the framework:

As you can see, Robot Framework's test library API is very simple. See Robot Framework User Guide for more information about creating test libraries, using Libdoc, and so on.

Generated results

After running tests, you will get report and log in HTML format. Example files are also visible online in case you are not interested in running the demo yourself. Notice that one of the test has failed on purpose to show how failures look like.

Running demo

Preconditions

A precondition for running the tests is having Robot Framework installed. It is most commonly used on Python but it works also with Jython (JVM) and IronPython (.NET). Robot Framework installation instructions cover installation procedure in detail. People already familiar with installing Python packages and having pip package manager installed, can simply run the following command:

pip install robotframework

Robot Framework 3.0 and newer support Python 3 in addition to Python 2. Also this demo project is nowadays Python 3 compatible.

Running tests

Test cases are executed with the robot command:

robot keyword_driven.robot

Note

If you are using Robot Framework 2.9 or earlier, you need to use Python interpreter specific command pybot, jybot or ipybot instead.

To execute all test case files in a directory recursively, just give the directory as an argument. You can also give multiple files or directories in one go and use various command line options supported by Robot Framework. The results available online were created using the following command:

robot --name Robot --loglevel DEBUG keyword_driven.robot data_driven.robot gherkin.robot

Run robot --help for more information about the command line usage and see Robot Framework User Guide for more details about test execution in general.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].