Skip to main content

Oxygen is an extensible tool for Robot Framework that enables you to integrate running other testing tools and their reports as part of Robot Framework's reporting.

Project description

Oxygen

Oxygen is a Robot Framework tool that empowers the user to convert the results of any testing tool or framework to Robot Framework's reporting. This consolidates all test reporting together regardless of tools used.

Oxygen has built-in parsers for three testing frameworks: JUnit, Gatling, and Zed Attack Proxy (ZAP).

Oxygen is designed to be extensible. Users can create their own handlers for other testing framework or tools to transform their reporting into the Robot Framework's log.html and report.html.

Table of Contents

  1. Installation
  2. Keyword documentation
  3. Usage
  4. Developing Oxygen
  5. License
  6. Acknowledgements

Installation

To install Oxygen, run the following:

$ pip install robotframework-oxygen

Pre-requisites

To check the Python version on the command line, run:

$ python --version

Keyword documentation

Keyword Documentation

Usage

Example: Robot Framework running other test tools

Main usage scenario for Oxygen is the ability to write acceptance test cases that run your tests in other test tools and integrate the resulting test report as part of Robot Framework's. This means you are able to run all of your testing from Robot Framework and thus having all test reporting consolidated together.

After installing Oxygen, it can be used in the Robot Framework suite to write test cases. For example, to build acceptance tests that run different sets of JUnit tests:

*** Settings ***
Library    oxygen.OxygenLibrary

*** Test cases ***

JUnit unit tests should pass
    [Tags]    testset-1
    Run JUnit    path/to/mydir/results.xml    java -jar junit.jar --reports-dir=path/to/mydir

JUnit integration tests should pass
    [Tags]    testset-2
    Run JUnit    path/to/anotherdir/results.xml    java -jar junit.jar --reports-dir=path/to/anotherdir

Then, run the suite by providing Oxygen as a listener:

$ robot --listener oxygen.listener my_tests.robot

Opening the Robot Framework log.html and report.html, you should see that test case JUnit unt tests should pass has been replaced by Oxygen with test cases matching with what is in the path/to/mydir/results.xml JUnit report file. Similarly, test case JUnit integration tests should pass has been replaced with results from path/to/anotherdir/results.xml; each JUnit test case with its relevant information has a counterpart in the log.html. Each JUnit test case is also tagged with the tags from the original Robot Framework test case.

The example above, for the brevity, shows incomplete commands to run JUnit tool from command line. Please refer to keyword documentation for more detailed documentation about keyword's arguments, as well as documentation for Gatling and ZAP related keywords. And, of course, refer to the particular tool documentation as well.

Using from command line

In case where you want to run your other testing tools separately, but yet combine results into unified Robot Framework log.html and report.html, you can use Oxygen's command line interface to convert single result file to single corresponding Robot Framework output.xml:

$ python -m oxygen oxygen.junit my_junit_results.xml

As a convention, the resulting Robot Framework xml file will be named by adding a suffix to the end. In the example above, the resulting Robot Framework xml file would be named my_junit_results_robot_output.xml.

Note that resulting xml file will also be created at the same location as the original result file. Therefore, when original result files are in another directory:

$ python -m oxygen oxygen.gatling path/to/results.log

Then results_robot_output.xml will be created under path/to/.

Developing Oxygen

Clone the Oxygen repository to the environment where you want to the run the tool.

Oxygen requires a set of dependencies to be installed. Dependencies are listed in the requirements.txt file:

$ pip install -r requirements.txt

Oxygen uses task runner tool invoke to run tests, build the project, etc.

Please refer to the available tasks for the project:

$ invoke --list

and the task file tasks.py.

License

Details of project licensing can be found in the LICENSE file in the project repository.

Acknowledgments

Oxygen tool was developed by Eficode Oy as part of Testomat project with funding by Business Finland.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

robotframework_oxygen-0.1-py3-none-any.whl (18.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page