diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2005-12-15 15:19:55 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2005-12-15 15:19:55 (GMT) |
commit | e03d87d8aef6701e7245b98800e67b64319bf7b2 (patch) | |
tree | 28b466594f6b6e33dd707d75625b016eb2d0edc1 /doc | |
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')
-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 433a302..3c37e5c 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> | ||
577 | Tests are the best way of knowing if the plugins work as expected. Please | ||
578 | create and update test cases where possible. | ||
579 | </para> | ||
580 | |||
581 | <para> | ||
582 | To run a test, from the top level directory, run "make test". This will run | ||
583 | all the current tests and report an overall success rate. | ||
584 | </para> | ||
585 | |||
586 | <para> | ||
587 | See the <ulink url="http://tinderbox.altinity.org">Nagios Plugins Tinderbox server</ulink> | ||
588 | for 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 | ||
596 | need 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> | ||
601 | If you want a summary test, run: "cd plugins && perl -MTest::Harness -e 'runtests(@ARGV)' t/check_disk.t". | ||
602 | This runs the test in a summary format. | ||
603 | </para> | ||
604 | |||
605 | <para> | ||
606 | For 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"> | ||
608 | link</ulink> | ||
609 | </para> | ||
610 | |||
611 | </section> | ||
612 | |||
613 | <section><title>Testing the C library functions</title> | ||
614 | <para> | ||
615 | Will be looking at using libtap, which is utilised by the FreeBSD team. The output is | ||
616 | based on perl's TAP (Test Anything Protocol) format, so that Test::Harness will understand | ||
617 | results. 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> |