Pcornel
Automation · Network Automation

Network Testing

Cheat sheet · https://pcornel.dk/topic.php?topic=5602

Back to the Topic

Answer

Network testing runs checks with clear expected results — can A reach B, is the OSPF neighbour up, does this route exist, is this port open — before and after a change, and fails the change when a check fails.

Remember

A test needs an expected result written down in advance. Test from the places users are, not only from the router. Run the same tests before and after: a test that already failed before the change is not caused by it.

First checks

  • pyats run job <job>.py --testbed-file tb.yaml — network tests
  • Reachability tests (ping matrix) — connectivity
  • Test results in CI — gating

Verify in this order

change → tests (lab/static/live) → pass/fail

Where it usually breaks

A passing network test proves only its defined path, context and assertion at that time; it does not establish universal service health.

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Network Testing Network Automation proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Intent / scopeSource revision and exact targets are explicitStale inventory, hidden selector or wrong variables change scope
Management operationTransport/model/payload and per-device response are traceableAuth/capability/parser differences hide partial or wrong execution
Device stateEffective and persistent state are read backAccepted config/API result is mistaken for convergence
Network proofOriginal control/data-plane or service test passesAutomation summary substitutes for actual network acceptance

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5602

Confirmation

Confirm action

Continue?