hewlettpackard / monkeyble Goto Github PK
View Code? Open in Web Editor NEWEnd-to-end testing framework for Ansible
Home Page: https://hewlettpackard.github.io/monkeyble/
License: GNU General Public License v3.0
End-to-end testing framework for Ansible
Home Page: https://hewlettpackard.github.io/monkeyble/
License: GNU General Public License v3.0
This is kind of a half-baked idea, but monkeyble seems uniquely positioned to generate a flow chart of a play/playbook/role, which could be a really nice addition to role documentation and such.
It could use Mermaid syntax, use the task names, represent looping and branching and such?
So maybe for example, you run several scenarios against a specific role or playbook, and a result a flowchart can be generated that shows various paths through the role.
An example of mermaid (quote or edit this post to see the syntax, better examples are out there):
graph TD
A[Thievery] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
It would be really cool if we cool if we could generate coverage reports with monkeyble so we could see coverage in our CI/CD
monkeyble list
Playbook | Scenario |
-----------+-----------------|
play1.yml | validate_test_1 |
play1.yml | validate_test_2 |
play2.yml | validate_this |
play2.yml | validate_that |
We should be able to execute a single test from its name
monkeyble test validate_test_1
Or multiple selected test
monkeyble test validate_test_1 validate_test_2
As far as I understand the documentation, the intent of Monkeyble is to provide a declarative way of writing unit tests for Ansible tasks. To that end, the YAML keys used to describe the expected outcome of tasks should have a meaning when read out loud.
While it is the case for should_be_changed
and should_be skipped
checks, reading should_failed
seems a little odd. I would suggest to change it to should_fail
so that the reader can understand this task should fail when reading the scenario.
Here the method should test that the task was not expected to fail.
If a task is "ok" or "fail" we check if the task should have failed. But this test is not performed in case of skipped task.
Hi,
I have been trying to install Monkeyble on a fresh install of Ansible today, but I keep getting the same error : Failure using method (v2_runner_on_start) in callback plugin (<ansible.plugins.callback.monkeyble_callback.CallbackModule object at 0x7f2fedaa1fd0>): 'Task' object has no attribute 'play'
.
My ansible.cfg file is exactly the same as the first one provided in the Hello World doc, with just the path to monkeyble changed.
Is this a known issue?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.