Skip to content

Code material for the RTP automation and programmability meetup talk about automated network testing.

License

Notifications You must be signed in to change notification settings

ttafsir/automated-network-testing-pytest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTP Network & Programmability Meetup - Test and Validate Networks with pytest

This repository contains the code for the presentations at the RTP Network & Programmability Meetup:

Meetup Presentations:

The Sample tests

The tests for the sessions are separate, depending on the branch. The tests are organized in different branches as follows:

  • main - includes simple and introductory tests reviewed during the Test and Validate Networks with Pytest 1 session. The tests do not require any test infrastructure and are located in the tests/quickstart directory. (Session 1)
  • pytest_features - includes examples of tests we reviewed during the discussion of Pytest Features, including introductory examples for some best practices. Some of these tests do require that you have a test infrastructure (See the Test Infrastructure section for more details). These tests are located in the tests/simple directory. (Session 1)
  • infra_tests - includes more advanced and realistic examples for infrastructure tests, including using an existing Ansible inventory and a connection library like netmiko with pytest using hooks. It also includes examples of accomplishing the same using the TestInfra plugin with an ansible backend. (Session 2)

Test Infrastructure

The test infrastructure for some examples in the repository uses the EVPN Symmetric IRB lab from https://github.com/arista-netdevops-community/avd-cEOS-Lab project (the NOTICE file includes license information). The inventory and playbooks directories in the root are almost identical, with only a slight modification I needed to make to the fabric-deploy-config.yaml playbook.

To deploy your own infrastructure using containerlab, please follow the directions from the project.

About

Code material for the RTP automation and programmability meetup talk about automated network testing.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published