{"repo":"HewlettPackard/monkeyble","free":true,"listed":false,"github":"https://github.com/HewlettPackard/monkeyble","clone":"git clone https://github.com/HewlettPackard/monkeyble.git","description":"End-to-end testing framework for Ansible","language":"Python","stars":134,"topics":["ansible","python","test","testing","end2end-testing"],"license":"GPL-3.0","category":"deployment-docker-iac","readme_excerpt":"End-to-end testing framework for Ansible Monkeyble Monkeyble is a callback plugin for Ansible that allow to execute end-to-end tests on Ansible playbooks with a Pythonic testing approach. 🧐 Monkeyble allows, at task level, to: - 🐵 Check that a module has been called with expected argument values - 🙊 Check that a module returned the expected result dictionary - 🙈 Check the task state (changed, skipped, failed) - 🙉 Mock a module and return a defined dictionary as result Monkeyble is designed to be executed by a CI/CD in order to detect regressions when updating an Ansible code base. 🚀 Complete documentation available here Hello Monkeyble Let's consider this simple playbook We prepare a yaml file that contains a test scenario We execute the playbook like by passing - the dedicated ansible config that load Monkeyble (see install doc) - the extra var file that contains our scenarios - one extra var with the selected scenario to validate validate hello monkey Here is the output: All tests have passed. The return code on stderr is 0 . Let's change the test to make it fail. We update the variable who at the beginning of the playbook. We execute the playbook the same way. The result is now the following: This time the test has failed. The return code on stderr is 1 . The CI/CD It would have warned you that something has changed. Quick tour Test input Monkeyble allows to check each instantiated argument value when the task is called: Monkeyble support multiple test methods: - ass","default_branch":null,"files":null,"tree":[],"storefront":"/r/HewlettPackard","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/HewlettPackard/monkeyble/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}