Skip to main content

Robot Framework Integration Plugin

Project description

Netbox nb-robot

The nb-robot plugin extends the capabilities of NetBox by seamlessly integrating Robot Framework, a widely used open-source test automation framework. Here’s what this plugin brings to the table:

1 - Test Automation Integration:

  • With the nb-robot plugin, NetBox users gain the ability to load and execute their Robot Framework test suites directly from within the NetBox web interface. This integration streamlines the process of running tests against network devices, configurations, and other critical infrastructure managed in NetBox.
  • Whether you’re validating network changes, checking connectivity, or ensuring proper configurations, the plugin empowers you to automate these tasks effortlessly.

2 - Model-Based Testing:

  • Leveraging NetBox’s existing data models (such as devices, interfaces, circuits, and more), the nb-robot plugin creates a vital bridge between network documentation and test automation.
  • Users can associate specific test cases or entire test suites with NetBox models. For example, you can link a Robot Framework test suite to a particular switch or router model within NetBox.
  • This model-based approach simplifies validation: Want to verify that a new VLAN configuration is correctly applied across all relevant devices? Associate your test suite with the VLAN model, and let the plugin handle the rest.

Compatibility

Plugin Version NetBox Version Tested on
1.0.0 > 4.1.0 4.1.0
2.0.2 > 4.2.0 4.2.2

Installation

The plugin is available as a Python package in pypi and can be installed with pip

pip install nb-robot

Enable the plugin in /opt/netbox/netbox/netbox/configuration.py:

PLUGINS = ['nb_robot']

Create a project folder and give netbox user read and write permissions over it

$ sudo mkdir /opt/netbox/netbox/robot_projects
$ sudo chown --recursive netbox /opt/netbox/netbox/robot_projects

Configuration

PLUGINS_CONFIG = {
    "nb_robot": {
        "projects_path": <custom_path>  ##  Path for storing Robot Framework project files
    },
}

Using Variables

With NBRobot you can inject variables inside your Test Suite in two ways, as a simple variable or in a Data Driven stile with Test Template

Simple Variable

After creating the variable devices inside NBRobot plugin you can callit inside your Test Suite like above:

*** Test Cases ***
Test Case Device Iter
    FOR     ${device}       IN      @{devices}
        Log     ${device.site}
    END

DataDriven model

In the DataDriven model NBRobot creates a Test Case based in the Test Template for each model inside your variable

*** Settings ***
Test Template    Check Naming Conventions

*** Test Cases ***

Check ${device} Naming Conventions

*** Keywords ***
Check Naming Conventions
    [Arguments]    ${device}
    Log Many    ${device}    ${device.site}

Roadmap

  • Allow users to setup variable values before running a Project
  • Allow users to compare two Project Jobs
  • Create API endpoint to Run and gather Suite results
  • Create Unit Tests

Screenshots

Project Views

Project Jobs

Result View

Result XML

Result Table

Resource View

Resource Source

Variable View

Project details


Download files

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

Source Distribution

nb_robot-2.0.1.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nb_robot-2.0.1-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file nb_robot-2.0.1.tar.gz.

File metadata

  • Download URL: nb_robot-2.0.1.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for nb_robot-2.0.1.tar.gz
Algorithm Hash digest
SHA256 3bc3d6854ced7d370eb62d6733eb6ed57726221c084fadb32014803c5fa75609
MD5 f3287a865c25de0de85fb30612fc0307
BLAKE2b-256 263f6d0b4ed37d1b48918e400ff2f4271444645e2454a6ab379b2194b58bea21

See more details on using hashes here.

File details

Details for the file nb_robot-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: nb_robot-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 35.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for nb_robot-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e9ccfac0bdf4e722bebc360ba7ab2a7625cbc59693918ef1cd0a2977152e88f2
MD5 c6408b44316efae718487756acf5994a
BLAKE2b-256 9255d216c28cd08ee7112b650caf5f174fe3f7d5beb68bc90b8789800ebc6733

See more details on using hashes here.

Supported by

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