Skip to main content

robotframework-roboops

Robot Framework's library for creating, sharing and running DevOps tasks easily and efficiently.

Building pipelines with Robot Framework gives developers clear insight what CI/CD steps do (thanks to keyword based syntax). Allow them to execute pipelines easily also on their own machines before pushing to repository and waiting for CI/CD tool to take it up.

Thanks to nice RFWK reporting it should be easy and fast to follow pipelines and investigate issues.


Primarly designed for testers/developers who use Robot Framework. They often create own python libraries and must maintain them.

But it's not limited only to that - you can automate any stuff with it - with syntax you know and reports you love.

Features

  • uses robotframework for running tasks - see all the benefits of robotframework
    • one that brings a lot of benefits are report and log files
  • keyword for running commands
  • keyword for linking artifacts into report metadata
  • any failure makes remaining tasks to fail automatically (skip)
  • others to come - raise your idea!

Installation instructions

pip install robotframework-roboops

Usage

RoboOps is typical Robotframework library - use it as usual robot library.

As this library is mainly focused on running tasks instead of tests, try to use *** Tasks *** instead of *** Test Cases *** in .robot files.

This repository uses RoboOps for building, testing (and in future deploying) itself. See ci.robot file to see example how to do it.

This repository uses github actions - check this out to see how to use it in CI pipeline.

Example

*** Settings ***
Library    RoboOps
Library    OperatingSystem

*** Variables ***
${atest dir}     ${CURDIR}/atest    
&{install python env}    command=poetry install
&{unit tests}    command=poetry run coverage run --source=RoboOps -m pytest .
&{report coverage}    command=poetry run coverage report -m --fail-under=80
&{generate wheel}    command=poetry build
&{remove stale roboops package from atest env}    command=poetry remove robotframework-roboops    cwd=${atest dir}    ignore_rc=True
&{install atest env}    command=poetry install    cwd=${atest dir}   
&{install atest roboops package from whl}    command=poetry add ../    cwd=${atest dir}

*** Tasks ***
Unit Test Stage
    Roboops Run Command    &{install python env}
    Roboops Run Command    &{unit tests}
    Create Coverage Report And Save It
    
Build Package Stage
    Roboops Run Command    &{generate wheel}
    
Acceptance Test Stage
    Roboops Run Command    &{remove stale roboops package from atest env}
    Roboops Run Command    &{install atest env}
    Roboops Run Command    &{install atest roboops package from whl}
    Roboops Run Command    &{run atests}
    [Teardown]    Save Acceptance Tests Artifacts

*** Keywords ***
Create Coverage Report And Save It
    ${coverage}    Roboops Run Command    &{report coverage}
    Create File    coverage.log    ${coverage.stdout.decode()}
    Roboops Save File Artifact    coverage.log    coverage.log

Save Acceptance Tests Artifacts
    Roboops Save File Artifact    ${atest dir}/log.html    atest_log.html
    Roboops Save File Artifact    ${atest dir}/report.html    atest_report.html
    Roboops Save File Artifact    ${atest dir}/output.xml    atest_output.xml

Running tests

Test everything (unit tests, acceptance tests, building wheel) by running:

robot ci.robot

running pipeline with docker (using python 3.6)

build docker image and run it:

docker build -t roboops:latest .
docker run --user $(id -u):$(id -g) --rm -v "${PWD}":/code --env PYTHONPATH=. roboops:latest

Security considerations

Be aware that secrets provided in environment variables may be logged by Task (e.g. with Log keyword).

So don't provide secrets into steps where .robot file is executed for commits without any reviewers approval.

Metadata

Release files for robotframework-roboops 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-roboops 0.2.4
File Size Uploaded Provenance Actions
robotframework-roboops-0.2.4.tar.gz 8.7 kB Without provenance Details for robotframework-roboops-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-roboops 0.2.4
File Interpreter ABI Platform Actions
robotframework_roboops-0.2.4-py3-none-any.whl Python 3 none any Details for robotframework_roboops-0.2.4-py3-none-any.whl

Total release size: 17.7 kB

Release files / robotframework-roboops-0.2.4.tar.gz

Download URL robotframework-roboops-0.2.4.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ea0311fe22d2bb442c490addf1309eb74be3d797902a19618d6bd922fb364ccb
BLAKE2b-256 checksum
How to use checksums
38568776047ef41ece11a4f5ffd52c8e84e44e2e49024822e7a924de24650348
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.6.12 Linux/5.4.0-1036-azure

Release files / robotframework_roboops-0.2.4-py3-none-any.whl

Download URL robotframework_roboops-0.2.4-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d669ba8a2099912f55f8c069059c213f86e16ec7d0e4bd72a9f6dfc786d3688
BLAKE2b-256 checksum
How to use checksums
84c03c800548221204b23bf46c27105e81c297ded3acbf2addfa02950c852b18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.6.12 Linux/5.4.0-1036-azure

Security for robotframework-roboops 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page