[Nagiosplug-devel] [ nagiosplug-Patches-1185704 ] New Testing Infrastructure
SourceForge.net
noreply at sourceforge.net
Sun Jul 24 16:32:26 CEST 2005
Patches item #1185704, was opened at 2005-04-19 17:31
Message generated for change (Settings changed) made by illumino
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1185704&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Enhancement
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Peter Bray (illumino)
>Assigned to: Peter Bray (illumino)
Summary: New Testing Infrastructure
Initial Comment:
The attched gzip'd tar archive contains a complete
replacement for the Nagios Plugins 1.4.0 testing
infrastructure and all currently written test
harnesses. I hope that it will meet with the approval
of the Nagios Plugins Team and replace the existing
infrastructure.
I have provided documentation of the key functions of the
infrastructure in the perl module NPTest.pm and the
test harnesses themselves should provide plenty of
working examples for further assisting a test harness
developer.
I hope this infrastructure will ease & encourage the
development of test harnesses for all of the Nagios
Plugins.
Reasoning behind the redevelopment:
* I have always had trouble with the existing
infrastructure,
it never seemed to create the "Cache.pm", and the testing
would not function until I had manually created it.
* The test harnesses themselves were out of date with
respect to the Nagios Plugins 1.4.0 test results.
* It was not possible to debug the existing test
harness during execution, as the values returned by the
execution of the plug-in were never shown to the user.
Making updating of out-of-date regexps more time consuming.
* Test harnesses themselves were not directly
executable. Although I did manage to work around this.
Attributes of the new infrastructure:
* A single perl module provides the bulk of the logic.
The Cache and Helper Modules are no longer required.
Aside: I considered rolling all of test.pl into the
module, so that could be with "perl -MNPTest -e
RunAll ..."
but that is not in the current implementation, but its
trivial.
* The workhorse function "checkCmd" supports
* debugging
* flexible exit status testing
* graceful handling of exceptions
* makes each test case more concise and easier to read
* All test harnesses are directly executable.
* All test harnesses are self contained. They no longer
rely on the wrapper to provide test parameters.
This could be seen as a negative, but not having to
update the wrapper every time a new test parameter
is added will simplify development.
* The new test parameter cache is much more flexible,
including support for default values, environment
variable
overrides and even scoped parameters should the need
arise.
I hope these attributes and the corrections to the existing
test harnesses will make the contribution a worth while
addition to the Nagios Plugins code base.
Peter Bray
Sydney, Australia
LEGAL STUFF: The submission is made "AS IS" with
without express or implied warranty. The contribution
may be used, redistributed and/or modified under the
same terms as the Nagios Plugins release.
----------------------------------------------------------------------
Comment By: Ton Voon (tonvoon)
Date: 2005-07-07 08:39
Message:
Logged In: YES
user_id=664364
Peter,
Thank you for this. I will look into this over the next few days, in
anticipation of including this in the 1.4.1 release in two weeks.
Ton
----------------------------------------------------------------------
Comment By: Peter Bray (illumino)
Date: 2005-06-13 00:35
Message:
Logged In: YES
user_id=426773
13th June : What (if anything) can I do to have this
submission evaluated by the Nagios Plugins Team?
----------------------------------------------------------------------
Comment By: Peter Bray (illumino)
Date: 2005-04-19 19:11
Message:
Logged In: YES
user_id=426773
Sorry, but I forgot the test.pl rewrite in the orginal
archive submission
Peter
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1185704&group_id=29880
More information about the Devel
mailing list