# hacking/test-module script pushed

**URL:** <https://forum.ansible.com/t/hacking-test-module-script-pushed/11349>\
**Category:** Ansible Project\
**Created:** [March 15, 2012, 1:52am UTC](https://forum.ansible.com/t/hacking-test-module-script-pushed/11349 "2012-03-15T01:52:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [March 15, 2012, 1:52am UTC](https://forum.ansible.com/t/hacking-test-module-script-pushed/11349/1 "2012-03-15T01:52:23Z")

</div>

I owe everyone a module development guide and this is a part of that.

If you would like to test a module outside of ansible, this script will help you do it. It not only runs the script  
but also validates that your output is parseable by Ansible.

USAGE FROM CHECKOUT:

./hacking/test-module ./library/command /bin/sleep 3

./hacking/test-module ./library/service name=httpd state=running

ETC

(NOTE: the async\_wrapper module is not testable this way)

This does not replace the unit tests and any module in core should try to have some. It is, however, a really  
good aid to development.

–Michael
