-
Notifications
You must be signed in to change notification settings - Fork 4
Testing
Testing is done from within the Ansible playbooks. After each Task, a notify statement is included with the name of the Handler used. Handler files use the same name as the Task file and each Handler contains links to Robot Framework files.
The idea is to create a pluggable structure that allows to include tests easily, according to a fixed pattern. Using this pattern allows to automatically aggregate test results into a single HTML report, which is pushed into a read-only Nexus repository when tests succeed. This allows to assure that a commit running in the environment has been tested, with the report to prove it.
Adding a test is be as simple as uncommenting the Notify command, adding the Handler and ROBOT file.
Currently a single test is included: testing the hostname. It uses command parsing through PyATS as well as linking to the brilliant work in the Genie API library, which contains over 1k tests, ready to be used, see also the Genie documentation.
Devoteam. Tech for People.