How aifakhri/network-test-automation-robotframework works
Project type and purpose
• This is a keyword‑driven Test Automation Framework built with Robotframework and Python, designed to validate BGP‑EVPN and VXLAN configurations on a virtual Arista vEOS CLOS topology.
• The top‑level entry point is “program_runner.py,” which dispatches Robotframework test suites against leaf and spine switch VMs.
File structure
• Top level:
• program_runner.py – CLI wrapper to select devices/tests.
• readme.md – project overview and usage.
• Libraries/ – Python modules that implement Robotframework keywords:
• commonLib.py
• bgpRouting.py
• bgpEvpn.py
• vxlanInstance.py
• Resources/
• Keywords/ – Robot .robot files that map test‐level keywords to the Python libraries.
• Variables/ – YAML device definitions (veosLeaf01.yaml, veosSpine02.yaml, etc.).
• Tests/ – Robot .robot test suites:
• test_bgp_evpn.robot
• test_bgp_routing.robot
• test_vxlan.robot
README for additional insights
• Describes a virtual vEOS CLOS topology.
• Instructs how to invoke the framework via program_runner.py with flags to target specific devices or groups.
Main components & relationships
a. User/CLI
– “program_runner.py” parses arguments (-d leaf|spine|veosLeaf01, etc.) and invokes
→ Robotframework engine
b. Robotframework engine
– Loads Test Suites from Tests/*.robot
– Loads Resource files:
• Keywords/*.robot (maps high‑level keywords to Python library methods)
• Variables/*.yaml (device IPs, credentials, topology roles)
– Loads Python Libraries from Libraries/*.py
c. Python Keyword Libraries
– Use network‑automation drivers (e.g., pyeapi, netmiko) to connect to vEOS devices
– Execute CLI or API commands to validate: BGP routing, EVPN state, VXLAN overlay
d. Network Devices (External Services)
– Virtual Arista vEOS switches arranged in a CLOS (leaf/spine) topology
Architectural patterns and design principles
• Keyword‑Driven Testing (Robotframework)
• Modular separation:
• Test logic (Tests/*.robot)
• Keyword definitions (Resources/Keywords/*.robot)
• Implementation (Libraries/*.py)
• Environment data (Resources/Variables/*.yaml)
• Single orchestration entry point (program_runner.py)