[Nagiosplug-checkins] nagiosplug/doc developer-guidelines.sgml,1.30,1.31

Ton Voon tonvoon at users.sourceforge.net
Thu Dec 15 07:21:02 CET 2005


Update of /cvsroot/nagiosplug/nagiosplug/doc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv640/doc

Modified Files:
	developer-guidelines.sgml 
Log Message:
New 3 parameter version of getTestParameters. Updated check_disk.t to reflect.
Added notes re: testing in developer guidelines.


Index: developer-guidelines.sgml
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/doc/developer-guidelines.sgml,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- developer-guidelines.sgml	2 Dec 2005 22:28:06 -0000	1.30
+++ developer-guidelines.sgml	15 Dec 2005 15:19:55 -0000	1.31
@@ -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>





More information about the Commits mailing list