diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2005-12-15 15:19:55 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2005-12-15 15:19:55 +0000 |
commit | e03d87d8aef6701e7245b98800e67b64319bf7b2 (patch) | |
tree | 28b466594f6b6e33dd707d75625b016eb2d0edc1 /doc/developer-guidelines.sgml | |
parent | 73b77a44c43960b6fcf8b3c29c1016ba1940aa89 (diff) | |
download | monitoring-plugins-e03d87d8aef6701e7245b98800e67b64319bf7b2.tar.gz |
New 3 parameter version of getTestParameters. Updated check_disk.t to reflect.
Added notes re: testing in developer guidelines.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1298 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'doc/developer-guidelines.sgml')
-rw-r--r-- | doc/developer-guidelines.sgml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/developer-guidelines.sgml b/doc/developer-guidelines.sgml index 433a3022..3c37e5c1 100644 --- a/doc/developer-guidelines.sgml +++ b/doc/developer-guidelines.sgml @@ -572,6 +572,53 @@ </section> </section> +<section id="Testcases"><title>Test cases</title> +<para> +Tests are the best way of knowing if the plugins work as expected. Please +create and update test cases where possible. +</para> + +<para> +To run a test, from the top level directory, run "make test". This will run +all the current tests and report an overall success rate. +</para> + +<para> +See the <ulink url="http://tinderbox.altinity.org">Nagios Plugins Tinderbox server</ulink> +for the daily test results. +</para> + +<section><title>Test cases for plugins</title> +<para>These use perl's Test::More. To do a one time test, run "cd plugins && perl t/check_disk.t". +</para> + +<para>There will somtimes be failures seen in this output which are known failures that +need to be fixed. As long as the return code is 0, it will be reported as "test pass". +(If you have a fix so that the specific test passes, that will be gratefully received!) +</para> + +<para> +If you want a summary test, run: "cd plugins && perl -MTest::Harness -e 'runtests(@ARGV)' t/check_disk.t". +This runs the test in a summary format. +</para> + +<para> +For a good and amusing tutorial on using Test::More, see this +<ulink url="http://search.cpan.org/~mschwern/Test-Simple-0.62/lib/Test/Tutorial.pod"> +link</ulink> +</para> + +</section> + +<section><title>Testing the C library functions</title> +<para> +Will be looking at using libtap, which is utilised by the FreeBSD team. The output is +based on perl's TAP (Test Anything Protocol) format, so that Test::Harness will understand +results. This is still in planning stages. +</para> +</section> + +</section> <section id="CodingGuidelines"><title>Coding guidelines</title> <para>See <ulink url="http://www.gnu.org/prep/standards_toc.html">GNU Coding standards</ulink> for general guidelines.</para> |