Giter Site home page Giter Site logo

hewlettpackard / monkeyble Goto Github PK

View Code? Open in Web Editor NEW
83.0 7.0 9.0 925 KB

End-to-end testing framework for Ansible

Home Page: https://hewlettpackard.github.io/monkeyble/

License: GNU General Public License v3.0

Python 96.62% Shell 3.38%
ansible python test testing end2end-testing

monkeyble's People

Contributors

a-belhadj avatar nosuchcommand avatar rndmh3ro avatar sispheor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

monkeyble's Issues

✨Feature Request - generate flow charts from test scenarios

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]

CLI: add monkeyble list command

monkeyble list

Playbook   | Scenario        |
-----------+-----------------|
 play1.yml | validate_test_1 |
 play1.yml | validate_test_2 | 
 play2.yml | validate_this   | 
 play2.yml | validate_that   | 

CLI: add test name to be executed

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

The should_failed check should preferably read should_fail instead

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.

'Task' object has no attribute 'play'

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.