NAME
Docs::Site_SVD::Test_Tech - Extends the Test program module
Title Page
Software Version Description
for
Docs::Site_SVD::Test_Tech - Extends the Test program module
Revision: AA
Version: 0.25
Date: 2004/05/18
Prepared for: General Public
Prepared by: SoftwareDiamonds.com E<lt>support@SoftwareDiamonds.comE<gt>
Copyright: copyright © 2003 Software Diamonds
Classification: NONE
1.0 SCOPE
This paragraph identifies and provides an overview of the released files.
1.1 Identification
This release, identified in 3.2, is a collection of Perl modules that extend the capabilities of the Perl language.
1.2 System overview
The system is the Perl programming language software. As established by the Perl referenced documents, program modules, such the "Test::Tech" module, extend the Perl language.
The "Test::Tech" module extends the capabilities of the "Test" module.
The design is simple. The "Test::Tech" module loads the "Test" module without exporting any "Test" subroutines into the "Test::Tech" namespace. There is a "Test::Tech" cover subroutine with the same name for each "Test" module subroutine. Each "Test::Tech" cover subroutine will call the &Test::$subroutine before or after it adds any additional capabilities. The "Test::Tech" module is a drop-in for the "Test" module.
The "Test::Tech" module extends the capabilities of the "Test" module as follows:
If the compared variables are references, stingifies the referenced variable by passing the reference through Data::Dumper before making the comparison. Thus, Test::Tech can test almost any data structure. If the compare variables are not refernces, use the &Test::ok and &Test::skip directly.
Adds a method to skip the rest of the tests upon a critical failure
Adds a method to generate demos that appear as an interactive session using the methods under test
1.3 Document overview.
This document releases Test::Tech version 0.25 providing description of the inventory, installation instructions and other information necessary to utilize and track this release.
3.0 VERSION DESCRIPTION
All file specifications in this SVD use the Unix operating system file specification.
3.1 Inventory of materials released.
This document releases the file
Test-Tech-0.25.tar.gz
found at the following repository(s):
http://www.softwarediamonds/packages/
http://www.perl.com/CPAN/authors/id/S/SO/SOFTDIA/
Restrictions regarding duplication and license provisions are as follows:
- Copyright.
-
copyright © 2003 Software Diamonds
- Copyright holder contact.
-
603 882-0846 E<lt>support@SoftwareDiamonds.comE<gt>
- License.
-
Software Diamonds permits the redistribution and use in source and binary forms, with or without modification, provided that the following conditions are met:
Redistributions of source code, modified or unmodified must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Commercial installation of the binary or source must visually present to the installer the above copyright notice, this list of conditions intact, that the original source is available at http://softwarediamonds.com and provide means for the installer to actively accept the list of conditions; otherwise, a license fee must be paid to Softwareware Diamonds.
SOFTWARE DIAMONDS, http://www.SoftwareDiamonds.com, PROVIDES THIS SOFTWARE 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTWARE DIAMONDS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING USE OF THIS SOFTWARE, EVEN IF ADVISED OF NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE POSSIBILITY OF SUCH DAMAGE.
3.2 Inventory of software contents
The content of the released, compressed, archieve file, consists of the following files:
file version date comment
------------------------------------------------------------ ------- ---------- ------------------------
lib/Docs/Site_SVD/Test_Tech.pm 0.25 2004/05/18 revised 0.24
MANIFEST 0.25 2004/05/18 generated, replaces 0.24
Makefile.PL 0.25 2004/05/18 generated, replaces 0.24
README 0.25 2004/05/18 generated, replaces 0.24
lib/Test/Tech.pm 1.25 2004/05/11 unchanged
t/Test/Tech/Tech.d 0.07 2004/05/11 unchanged
t/Test/Tech/Tech.pm 0.06 2004/05/11 unchanged
t/Test/Tech/Tech.t 0.2 2004/05/11 unchanged
t/Test/Tech/techA0.t 0.13 2004/04/15 unchanged
t/Test/Tech/techA2.txt 0.09 2004/04/15 unchanged
t/Test/Tech/techB0.t 0.09 2004/04/13 unchanged
t/Test/Tech/techC0.t 0.13 2004/04/13 unchanged
t/Test/Tech/techC2.txt 0.12 2004/05/11 unchanged
t/Test/Tech/techD0.d 0.06 2004/04/13 unchanged
t/Test/Tech/techD2.txt 0.07 2003/09/15 unchanged
t/Test/Tech/techD3.txt 0.07 2003/09/15 unchanged
t/Test/Tech/techE0.t 0.09 2004/05/11 unchanged
t/Test/Tech/techE2.txt 0.2 2004/05/11 unchanged
t/Test/Tech/techF0.t 0.08 2004/05/11 unchanged
t/Test/Tech/techF2.txt 0.23 2004/05/11 unchanged
t/Test/Tech/File/Package.pm 1.17 2004/05/18 unchanged
t/Test/Tech/File/SmartNL.pm 1.16 2004/05/18 revised 1.15
t/Test/Tech/Text/Scrub.pm 1.13 2004/05/18 unchanged
t/Test/Tech/Data/Secs2.pm 1.23 2004/05/18 unchanged
t/Test/Tech/Data/SecsPack.pm 0.08 2004/05/18 unchanged
t/Test/Tech/Data/Startup.pm 0.06 2004/05/18 unchanged
t/Test/Tech/V001024/Test.pm 1.25 2003/09/15 unchanged
t/Test/Tech/V001015/Test.pm 1.16 2003/09/15 unchanged
3.3 Changes
Changes are as follows:
- Test-Tester-0.01
-
Originated.
- Test-Tester-0.02
-
Minor changes to this SVD.
- Test-Tech-0.01
-
Due to a non-registered namespace conflict with CPAN, changed the namespace from Test::Tester to Test::Tech
- Test-Tech-0.02
-
Fixed prototype for &Test::Tech::skip_rest Test::Tech line 84
- Test-Tech-0.03
-
The &Data::Dumper::Dumper subroutine stringifies the internal Perl variable. Different Perls keep the have different internal formats for numbers. Some keep them as binary numbers, while others as strings. The ones that keep them as strings may be well spec. In any case they have been let loose in the wild so the test scripts that use Data::Dumper must deal with them.
Added a probe to determine how a Perl stores its internal numbers and added code to the test script to adjust for the difference in Perl
~~~~~
###### # This is perl, v5.6.1 built for MSWin32-x86-multi-thread # (with 1 registered patch, see perl -V for more detail) # # Copyright 1987-2001, Larry Wall # # Binary build 631 provided by ActiveState Tool Corp. http://www.ActiveState.com # Built 17:16:22 Jan 2 2002 # # # Perl may be copied only under the terms of either the Artistic License or the # GNU General Public License, which may be found in the Perl 5 source kit. # # Complete documentation for Perl, including FAQ lists, should be found on # this system using `man perl' or `perldoc perl'. If you have access to the # Internet, point your browser at http://www.perl.com/, the Perl Home Page. # # ~~~~~~~ # # Wall, Christiansen and Orwant on Perl internal storage # # Page 351 of Programming Perl, Third Addition, Overloadable Operators # quote: # # Conversion operators: "", 0+, bool # These three keys let you provide behaviors for Perl's automatic conversions # to strings, numbers, and Boolean values, respectively. # # ~~~~~~~ # # Internal Storage of Perls that are in the wild # # string - Perl v5.6.1 MSWin32-x86-multi-thread, ActiveState build 631, binary # number - Perl version 5.008 for solaris # # Perls in the wild with internal storage of string may be mutants that need to # be hunted down killed. # ######## # Probe Perl for internal storage method # my $probe = 3; my $actual = Dumper([0+$probe]); my $internal_storage = 'undetermine'; if( $actual eq Dumper([5]) ) { $internal_storage = 'number'; } elsif ( $actual eq Dumper(['3']) ) { $internal_storage = 'string'; }
- Test::Tech 0.04
-
Added functions with the same name as the "Test" functions. This make it easier to upgrade from "Test" to "Test::Tech"
Added tests not only for Test 1.15 but also Test 1.24
Added tests for the new "Test" functions.
- Test-Tech-0.05
-
Replaced using Test::Util that has disappeared with its replacements: File::FileUtil, Test::STD::Scrub, Test::STD::STDutil
- Test-Tech-0.06
-
This version changes the previous version but eliminating all object methods. Since this module is built on the Test and the Data::Dumper modules, neither which are objectified, there is little advantage in providing methods where a large number of data is static for all objects. In other words, all new objects are mostly same.
- Test-Tech-0.07
-
- t/Test/Tech/Tech.t t/Test/Tech/techCO.t
-
Corrected typos in comments. More info in comments
- Tech::Tech
-
Changed the test for TESTERR and Program_lines for setting in the tech_p hash from version number to if they are defined.
- File::Util
-
Broke "File::FileUtil" apart into modules with more descriptive names. Switch to using the new modules "File::Package" and "File::SmartNL" instead of "file::FileUtil".
- Test-Tech-0.09
-
Left over usage of File::FileUtil in the test script files. Removed them. Switch from "Test::STD::Scrub" to "Text::Scrub"
- Test-Tech-0.11
-
In the test script, switch to using "Data::Hexdumper" module. Much better hex dumper.
- Test-Tech-0.12
-
Removed hex dump in test script.
Change test for begining printout of data, modules used, tec to 1.20 < Test::VERSION
Change the test so that test support program modules resides in distribution directory tlib directory instead of the lib directory. Because they are no longer in the lib directory, test support files will not be installed as a pre-condition for the test of this module. The test of this module will precede immediately. The test support files in the tlib directory will vanish after the installtion.
- Test-Tech-0.13
-
If there is no diagianotic message and there is a test name, then use the test name also for the diagnostic message. Diagnostic message appears in brackets after the expected value.
- Test-Tech-0.14
-
Broke out the 'stringify' subroutine into its own module: 'Data::Strify'
Use Archive::TarGzip 0.02 that uses mode 777 for directories instead of 666. Started to get emails from Unix about untar not being able to change to a directory with mod of 666.
- Test-Tech-0.15
-
Changed from using 'Data::Strify' to 'Data::Secs2' for the stringify function. 'Data::Secs2' is useful for SEMI clients and also provides sorted hash keys required for comparing stringifcation of Perl's nested data. The 'Data::Secs2' obsoletes 'Data::Strify' which is history.
Double checked that PREREQ_PM is 'Data::Secs2' which fixes Test-Tech-0.14 error in the PREREQ_PM which errorneous used by 'Data/Strify.pm' instead of 'Data::Strify'. This should clear complain by Mike Castle <dalgoda@ix.netcom.com> that the MakeFile.PL for Test-Tech-0.14 crashes with a divide by zero.
- Test-Tech-0.16
-
Strange failure from cpan-testers
Cc: SOFTDIA@cpan.org Subject: FAIL Test-Tech-0.15 sun4-solaris 2.8 To: cpan-testers@perl.org
Additional comments:
Hello, Samson Monaco Tutankhamen! Thanks for uploading your works to CPAN.
I noticed that the test suite seem to fail without these modules: Data::Secs2
As such, adding the prerequisite module(s) to 'PREREQ_PM' in your Makefile.PL should solve this problem. For example:
WriteMakefile( AUTHOR => 'Samson Monaco Tutankhamen (support@SoftwareDiamonds.com)', ... # other information PREREQ_PM => { 'Data::Secs2' => '0', # or a minimum workable version } );
The PREREQ_PM in the Test-Tech-0.15 MakeFile.PL is as follows:
PREREQ_PM => {Data::Secs2 => 0.01},
Changed to
PREREQ_PM => {'Data::Secs2' => '0.01'},
- Test-Tech-0.17
-
The POD was citing &Data::Dumper::Dumper which was replaced by Data::Secs2::stringify. Changed the POD over to &Data::Secs2::stringify
The finish() subroutine was in the POD as a subroutine/method but not part of @EXPORT_OK. Add it to @EXPORT_OK.
Redirected all output from the 'Test::' module throught a handle Tie. The handle Tie added the test name on the same line as the 'ok' 'not ok' and collected stats.
Added printout of the stats to the finish() subroutine.
Added optional [@options] or {@options} input to the end of the ok subroutine and the skip subroutine.
- Test-Tech-0.18
-
The test script could not find one of the test library program modules. Revamp the test script and test library modules and added steps to the ExtUtils::SVDmaker to have the SVDmaker test target run tests with just bare @INC that references a vigin Perl installation libraries only.
The lastest build of Test::STDmaker now assumes and expects the test library in the same directory as the test script. Coordiated with the lastest Test::STDmaker by moving the test library from tlib to t/Tie, the same directory as the test script and deleting the test library File::TestPath program module.
- Test-Tech-0.19
-
Subject: FAIL Test-Tech-0.18 i586-linux 2.4.22-4tr From: cpansmoke@alternation.net Date: Thu, 8 Apr 2004 15:09:35 -0300 (ADT) PERL_DL_NONLAZY=1 /usr/bin/perl5.8.0 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/Test/Tech/Tech.t t/Test/Tech/Tech....Can't locate FindBIN.pm Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=linux, osvers=2.4.22-4tr, archname=i586-linux
This is capitalization problem. The program module name is 'FindBin' not 'FindBIN' which is part of Perl. Microsoft does not care about capitalization differences while linux does. This error is in the test script automatically generated by
Test::STDmaker
and was just introduced when moved test script libraries fromtlib
to the directory of the test script. RepairedTest::STDmaker
and regenerated the distribution. - Test-Tech-0.20
-
FAILURE REPORT:
Subject: FAIL Test-Tech-0.19 i586-linux 2.4.22-4tr To: cpan-testers@perl.org From: cpansmoke@alternation.net Date: Sat, 10 Apr 2004 05:07:51 -0300 (ADT)
[snip]
Can't locate Data/Secs2.pm in @INC
[snip]
As such, adding the prerequisite module(s) to 'PREREQ_PM' in your Makefile.PL should solve this problem. For example:
WriteMakefile( AUTHOR => 'Samson Monaco Tutankhamen (support@SoftwareDiamonds.com)', ... # other information PREREQ_PM => { 'Data::Secs2' => '0', # or a minimum workable version } );
[snip]
CORRECTIVE ACTION:
An exam of MakeFile.PL revealed the following:
WriteMakefile( # [snip] PREREQ_PM => {'Data::Secs2' => '0.01'}, # [snip] );
Cannot see anything wrong with the PREREQ_PM statement. The only possibilities that come to mind are either CPAN not processing the prereq_pm properly, same syntax problem with
PREREQ_PM
or because the test script usesTest::Tech
to testTest::Tech
, the prereq is processed too late.Added
Data::Secs2
to the test library so the test will run. - Test-Tech-0.21
-
For
Test
module, version 1.20 or greater, changed so it sents failure messages when skip flag turned on for&Test::Tech::ok
and&Test::Tech::ok
out$Test::TESTERR
instead of$Test::TESTOUT
.For
&Test::Tech::finish
automatically generate failure messages for all missing (not performed) test when the skip rest of tests flag is on.The
FindBIN
that runs fine on Win because Win file spec is case insensitive and Unix whats case sensitiveFindBin
was fixed with on testTest::Test
. However, overlooked all the test scripts that the top test script runs, grabs the output and compares to expected ouput stored in files. Corrected theFindBin
for following test software:TechA0.t TechB0.t TechC0.t TechD0.d TechE0.t
- Test-Tech-0.22
-
The
Data::SecsPack
program module is now required to run theTest::Tech
program module. Added a print out of theData::SecsPack
version to theplan
subroutine as follows:# Data::Secs2 : $Data::SecsPack::VERSION
- Test-Tech-0.23
-
Added
is_skip
ok_sub and skip_sub subroutines.Added reporting of
Data::Secs2::stringify()
errors. Correctly stringify Perl data structures is not straight forward. UnlikeTest
andTest::Tech
,Data::Secs2
is very large including walks of Perl data structures, processing of underlying data types such asCODE
and many other areas where there may be unanticipated Perl data structure issues not properly addressed. Thus, best to have error detection in place, and stop testing if there is a brokenData::Secs2::stringify()
.Changed the look of the
demo
subroutine output to better resemble Perl code. Print the code straight forward without leading '=>'. Put a Perl comment '# ' in front of each result line instead of printing it straing forward.Added a print out of the
Data::Start
version and number of tests to theplan
subroutine. - Test-Tech-0.24
-
None of the test script for 0.23 ran. It appears that the Data::Secs2 does not load properly and, thus, none of the test scripts execute
t/Test/Tech/Tech....Data::Secs2 version 1.22 required--this is only version 1.19
Seen this before were CPAN has troubles with
WriteMakefile
subroutine in theMakeFile.PL
PREREQ_PM => {'Data::Secs2' => '1.22', 'Data::SecsPack' => '0.06', 'Data::Startup' => '0.03', 'Test' => '1.20',},
Put the correct version in the test library, upload and see if this is the problem.
- Test-Tech-0.25
-
It is unclear whether the failures to Test-Tech-0.24 is because of CPAN setup.
t/Test/Tech/Tech....Perl lib version (v5.8.4) doesn't match executable version (v5.6.1) at /usr/local/perl-5.8.4/lib/5.8.4/sparc-linux/Config.pm line 32. Compilation failed in require at /usr/local/perl-5.8.4/lib/5.8.4/FindBin.pm line 97.
Since cannot get a response from the tester, bump the version to force a retest.
3.4 Adaptation data.
This installation requires that the installation site has the Perl programming language installed. There are no other additional requirements or tailoring needed of configurations files, adaptation data or other software needed for this installation particular to any installation site.
3.5 Related documents.
There are no related documents needed for the installation and test of this release.
3.6 Installation instructions.
Instructions for installation, installation tests and installation support are as follows:
- Installation Instructions.
-
To installed the release file, use the CPAN module pr PPM module in the Perl release or the INSTALL.PL script at the following web site:
http://packages.SoftwareDiamonds.com
Follow the instructions for the the chosen installation software.
If all else fails, the file may be manually installed. Enter one of the following repositories in a web browser:
http://www.softwarediamonds/packages/ http://www.perl.com/CPAN/authors/id/S/SO/SOFTDIA/
Right click on 'Test-Tech-0.25.tar.gz' and download to a temporary installation directory. Enter the following where $make is 'nmake' for microsoft windows; otherwise 'make'.
gunzip Test-Tech-0.25.tar.gz tar -xf Test-Tech-0.25.tar perl Makefile.PL $make test $make install
On Microsoft operating system, nmake, tar, and gunzip must be in the exeuction path. If tar and gunzip are not install, download and install unxutils from
http://packages.softwarediamonds.com
- Prerequistes.
-
'Data::Secs2' => '1.22', 'Data::SecsPack' => '0.06', 'Data::Startup' => '0.03', 'Test' => '1.20',
- Security, privacy, or safety precautions.
-
None.
- Installation Tests.
-
Most Perl installation software will run the following test script(s) as part of the installation:
t/Test/Tech/Tech.t
- Installation support.
-
If there are installation problems or questions with the installation contact
603 882-0846 E<lt>support@SoftwareDiamonds.comE<gt>
3.7 Possible problems and known errors
Known issues are as follows:
- Merge with the "Test" module
-
The "Test::Tech" capabilites could be incorporated into the "Test" program module and "Test::Tech" eliminated.
- TestLevel and Program_Lines
-
The "Test" module does not take the $TestLevel value into account where it chooses the module to load the %Program_Line hash. Since the Test::Tech module adds a module layer in between the Test module that the test script, the $TestLevel must be set to 1. Thus, the Test module loads the Test::Tech module into %Program_Line hash instead of the Module Under Test.
4.0 NOTES
The following are useful acronyms:
- .d
-
extension for a Perl demo script file
- .pm
-
extension for a Perl Library Module
- .t
-
extension for a Perl test script file
2.0 SEE ALSO
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 87:
Non-ASCII character seen before =encoding in '©'. Assuming CP1252