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.0.tar.gz (25.5 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.0-py3-none-any.whl (33.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nb_robot-2.0.0.tar.gz
  • Upload date:
  • Size: 25.5 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.0.tar.gz
Algorithm Hash digest
SHA256 fa89e9ff62c272d09cf9e2d8b9e524ee52454c2e81ad61869b26bf2a735642d5
MD5 8d23bbeb7228ded8179ed74f84ea1b36
BLAKE2b-256 7ef2278c41e6bc52fa9791e85edaffb74717e58fd1fa50dd7c1cbf06c4570808

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nb_robot-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 33.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0243a0c3fd77e5a0eaf2e58820702484efe5656628494d2eaf908d4e5dd0fa0d
MD5 67b309b6001ea1fb86ba73ea8c278b87
BLAKE2b-256 501b5ade92bf20c2cf8612c15811f3e5b83f9f921b94524f31be1b7e597fa698

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