summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2005-12-15 15:19:55 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2005-12-15 15:19:55 +0000
commite03d87d8aef6701e7245b98800e67b64319bf7b2 (patch)
tree28b466594f6b6e33dd707d75625b016eb2d0edc1 /doc
parent73b77a44c43960b6fcf8b3c29c1016ba1940aa89 (diff)
downloadmonitoring-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')
-rw-r--r--doc/developer-guidelines.sgml47
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 @@
572 </section> 572 </section>
573</section> 573</section>
574 574
575<section id="Testcases"><title>Test cases</title>
576<para>
577Tests are the best way of knowing if the plugins work as expected. Please
578create and update test cases where possible.
579</para>
580
581<para>
582To run a test, from the top level directory, run "make test". This will run
583all the current tests and report an overall success rate.
584</para>
585
586<para>
587See the <ulink url="http://tinderbox.altinity.org">Nagios Plugins Tinderbox server</ulink>
588for the daily test results.
589</para>
590
591<section><title>Test cases for plugins</title>
592<para>These use perl's Test::More. To do a one time test, run "cd plugins && perl t/check_disk.t".
593</para>
594
595<para>There will somtimes be failures seen in this output which are known failures that
596need to be fixed. As long as the return code is 0, it will be reported as "test pass".
597(If you have a fix so that the specific test passes, that will be gratefully received!)
598</para>
599
600<para>
601If you want a summary test, run: "cd plugins && perl -MTest::Harness -e 'runtests(@ARGV)' t/check_disk.t".
602This runs the test in a summary format.
603</para>
604
605<para>
606For a good and amusing tutorial on using Test::More, see this
607<ulink url="http://search.cpan.org/~mschwern/Test-Simple-0.62/lib/Test/Tutorial.pod">
608link</ulink>
609</para>
610
611</section>
612
613<section><title>Testing the C library functions</title>
614<para>
615Will be looking at using libtap, which is utilised by the FreeBSD team. The output is
616based on perl's TAP (Test Anything Protocol) format, so that Test::Harness will understand
617results. This is still in planning stages.
618</para>
619</section>
620
621</section>
575<section id="CodingGuidelines"><title>Coding guidelines</title> 622<section id="CodingGuidelines"><title>Coding guidelines</title>
576 <para>See <ulink url="http://www.gnu.org/prep/standards_toc.html">GNU 623 <para>See <ulink url="http://www.gnu.org/prep/standards_toc.html">GNU
577 Coding standards</ulink> for general guidelines.</para> 624 Coding standards</ulink> for general guidelines.</para>