You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Automation without testing is dangerous — you can misconfigure thousands of devices as quickly as one. This lesson covers testing and validation tools that ensure your automation changes are correct before they are deployed and verified after deployment.
| Risk | Consequence |
|---|---|
| Untested config push | Outage affecting thousands of users |
| Typo in a template | Wrong IP address, broken routing |
| Missing rollback plan | Cannot recover from a failed change |
| No pre-change validation | Deploy a change that conflicts with existing config |
| No post-change validation | Assume the change worked without verification |
┌─────────────┐
│ Integration │ Test against real/virtual devices
│ Tests │ (pyATS, robot framework)
├─────────────┤
│ Simulation │ Model the network and analyse
│ Tests │ (Batfish, GNS3)
├─────────────┤
│ Unit │ Test templates, data, logic
│ Tests │ (pytest, yamllint, j2lint)
└─────────────┘
# Validate YAML syntax
pip install yamllint
yamllint host_vars/
# Validate Jinja2 templates
pip install j2lint
j2lint templates/
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.