From e03d87d8aef6701e7245b98800e67b64319bf7b2 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Thu, 15 Dec 2005 15:19:55 +0000 Subject: 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 --- doc/developer-guidelines.sgml | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'doc') 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 @@ +
Test cases + +Tests are the best way of knowing if the plugins work as expected. Please +create and update test cases where possible. + + + +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. + + + +See the Nagios Plugins Tinderbox server +for the daily test results. + + +
Test cases for plugins +These use perl's Test::More. To do a one time test, run "cd plugins && perl t/check_disk.t". + + +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!) + + + +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. + + + +For a good and amusing tutorial on using Test::More, see this + +link + + +
+ +
Testing the C library functions + +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. + +
+ +
Coding guidelines See GNU Coding standards for general guidelines. -- cgit v1.2.3-74-g34f1