Docs::Site_SVD::Test_STDmaker - generate test scripts, demo scripts from a test description short hand
Software Version Description for Docs::Site_SVD::Test_STDmaker - generate test scripts, demo scripts from a test description short hand Revision: U Version: 0.23 Date: 2004/05/24 Prepared for: General Public Prepared by: SoftwareDiamonds.com E<lt>support@SoftwareDiamonds.comE<gt> Copyright: copyright © 2003 Software Diamonds Classification: NONE
This paragraph identifies and provides an overview of the released files.
This release, identified in 3.2, is a collection of Perl modules that extend the capabilities of the Perl language.
The system is the Perl programming language software. As established by the Perl referenced documents, the "Test::STDmaker" program module extends the Perl language.
The input to "Test::STDmaker" is the __DATA__ section of Software Test Description (STD) program module. The __DATA__ section must contain STD forms text database in the DataPort::FileType::DataDB format.
Using the data in the database, the "Test::STDmaker" module provides the following:
Automate Perl related programming needed to create a test script resulting in reduction of time and cost.
Translate a short hand Software Test Description (STD) file into a Perl test script that eventually makes use of the "Test" module via added capabilities of the "Test::Tech module.
Translate the sort hand STD data file into a Perl demo script that demonstrates the features of the the module under test.
Replace the POD of a the STD file with the __DATA__ formDB text database, information required by a US Department of Defense (DOD) Software Test Description (STD) Data Item Description (DID).
The Test::STDmaker package relieves the designer and developer from the burden of filling out templates, counting oks, providing documentation examples, tracing tests to test requirments, and other such time consuming, boring, development tasks. Instead the designers and developrs need only to fill in an a form. The Test::STDmaker will take it from there and automatically and quickly generate the desired test scripts, demo scripts, and test description documents.
Test::STDmaker
See the Test::STDmaker POD for further detail on the text database fields and the processing.
This document releases Test::STDmaker version 0.23 providing description of the inventory, installation instructions and other information necessary to utilize and track this release.
All file specifications in this SVD use the Unix operating system file specification.
This document releases the file
Test-STDmaker-0.23.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 © 2003 Software Diamonds
603 882-0846 E<lt>support@SoftwareDiamonds.comE<gt>
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.
The content of the released, compressed, archieve file, consists of the following files:
file version date comment ------------------------------------------------------------ ------- ---------- ------------------------ lib/Docs/Site_SVD/Test_STDmaker.pm 0.23 2004/05/24 revised 0.22 MANIFEST 0.23 2004/05/24 generated, replaces 0.22 Makefile.PL 0.23 2004/05/24 generated, replaces 0.22 README 0.23 2004/05/24 generated, replaces 0.22 lib/Test/STDmaker.pm 1.21 2004/05/24 unchanged lib/Test/STDmaker/Check.pm 1.15 2004/05/23 unchanged lib/Test/STDmaker/Demo.pm 1.14 2004/05/21 unchanged lib/Test/STDmaker/STD.pm 1.12 2004/05/23 unchanged lib/Test/STDmaker/Verify.pm 1.15 2004/05/22 unchanged lib/Test/STD/PerlSTD.pm 1.08 2004/05/19 unchanged t/Test/STDmaker/advance.d 0.01 2004/05/24 unchanged t/Test/STDmaker/advance.pm 0.01 2004/05/24 unchanged t/Test/STDmaker/advance.t 0.01 2004/05/24 unchanged t/Test/STDmaker/basic.d 0.01 2004/05/24 unchanged t/Test/STDmaker/basic.pm 0.01 2004/05/24 unchanged t/Test/STDmaker/basic.t 0.01 2004/05/24 unchanged t/Test/STDmaker/tg0.pm 0.03 2004/04/09 unchanged t/Test/STDmaker/tg2A.pm 0.06 2004/05/23 unchanged t/Test/STDmaker/tg2B.pm 0.07 2004/05/23 unchanged t/Test/STDmaker/tgA0.pm 0.08 2004/05/23 unchanged t/Test/STDmaker/tgA2.pm 0.09 2004/05/23 unchanged t/Test/STDmaker/tgA2A2.txt 0.13 2004/05/23 unchanged t/Test/STDmaker/tgA2A3.txt 0.13 2004/05/23 unchanged t/Test/STDmaker/tgA2B.txt 0.1 2004/05/24 revised 0.09 t/Test/STDmaker/tgA2C.txt 0.1 2004/05/22 unchanged t/Test/STDmaker/tgB0.pm 0.02 2004/05/18 unchanged t/Test/STDmaker/tgB2.pm 0.04 2004/05/23 unchanged t/Test/STDmaker/tgB2.txt 0.1 2004/05/23 unchanged t/Test/STDmaker/tgC0.pm 0.04 2004/05/18 unchanged t/Test/STDmaker/tgC2.pm 0.06 2004/05/23 unchanged t/Test/STDmaker/tgD0.pm 0.06 2004/05/22 unchanged t/Test/STDmaker/tmake.pl 1.06 2004/05/24 unchanged t/Test/STDmaker/Text/Scrub.pm 1.16 2004/05/24 revised 1.15 t/Test/STDmaker/Test/Tech.pm 1.26 2004/05/24 unchanged t/Test/STDmaker/Data/Secs2.pm 1.26 2004/05/24 unchanged t/Test/STDmaker/Data/Str2Num.pm 0.08 2004/05/24 unchanged t/Test/STDmaker/Data/Startup.pm 0.07 2004/05/24 unchanged
Changes are as follows:
This is the original release. There are no previous releases to change.
Added test for DO: field
Added test for VO: field
Added a loop around two A: and E: fields.
Added requirements for DO: VO: and looping a test
Added and revise code to make DO: VO: and looping work
Low level subroutines are broken out as separate distribution modules: Test::TestUtil Test::Tech DataPort::FileType::FormDB DataPort::DataFile
The STD::STDgen was renamed Test::STDmaker to comply with CPAN directives to use existing top levels whenever possible.
Replaced using Test::TestUtil with File::FileUtil, Test::STD::Scrub, Test::STD::STDutil
Added tests to deal with the fact that Data::Dumper produces different results on different Perls
Added "Test" and "Data::Dumper" modules to the t directory so there are no surprises because of Test versions.
Changed the generated test script to use subroutine interface of "Test::Tech" The object interface was removed.
Make the same additions to @INC for "Test::STDtype::Demo" and "Test::STD::Check" as for "Test::STDtype::Verify".
Changed from using "File::FileUtil" (disappeared) to the File::* modules broken out from "File::FileUtil"
Changed from using "Test::STD::STDutil" (disappeared) to the File::* modules broken out from "Test::STD::STDutil"
Added the -options_pm option and the ability to make multiple tests from a file list.
Chnage name of Test::Table to Test::Column. Test::Table taken.
Added DM Diagnostic Message tag
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.
Change the location where of Test::STDmaker expects the test library from tlib to the the same directory as the test script. Eliminated the need for File::TestPath. which adds the tlib directory to the @INC directory of lists with the below Perl build-ins:
use FindBIN use lib $FindBin::Bin;
Replace the obsoleted File::PM2File program module with File::Where.
Eliminated detecting broken Perl where Data::Dumper treats arrays of number as strings on some Perl and numbers on others. If something is broken, replace it with a fixed version in order to pass the tests for the Test::STDmaker program module.
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 a 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 from tlib to the directory of the test script. Repaired Test::STDmaker and regenerated the distribution.
tlib
Added the generated xxxx.d demo script prints out the test name as a comment.
Added the report option that automatically runs all tests scripts and replaces the UUT program module =headx Test Report section with the output.
report
=headx Test Report
The test software uses the lastest version of Test::Tech. This impacted the expected values of the old tests slightly. Made the adjustments.
Test::Tech
Added the &Test::Tech::is_skip subroutine.
&Test::Tech::is_skip
Added a left edge space column to the =\headx test report automatically generated section so that POD formats it as code.
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.
demo
Added the QC: that is same for the C: field except for the demo script. The demo script silently executes a QC:, quiet code, data.
QC:
C:
Recoded so that none of the modules uses File::Data program module.
File::Data
CPAN is picking up the templates as PODs. Escape out the template POD commands with a '\'.
Under certain test conditions, the Software Test Description (STD) program module (PM) cannot be found.
From: "Thurn, Martin" <martin.thurn@ngc.com> Subject: FAIL Test-STDmaker-0.10 sun4-solaris 2.8
Can't locate t/Test/STDmaker/tgA1.pm in @INC (@INC contains: . /disk1/src/PERL/.cpanplus/5.9.1/5.9.1/build/Test-STDmaker-0.10/t/Test
Added code that will add the appropriate directory to @INC for these test conditions.
For regression tests, the POD describes the relationship between the 'lib' and the 't' directories so that the Test::STDmaker package can find the STD PM.
Problems with CPAN picking up wrong NAME for Test::STDmaker::Verify and Test::STD::PerlSTD. Fixed
Test::STDmaker::Verify
Test::STD::PerlSTD
Use lastest Data::Secs2 that does not use Data::SecsPack unless needed. Some of the sites having trouble loading Data::SecsPack GMP libraray.
Data::Secs2
Data::SecsPack
Changed Test::STDmaker::Demo and Test::STDmaker::Check so they load Test::Tech after setting up @INC. Else missing finding some test library modules because they are not in the INC path.
Test::STDmaker::Demo
Test::STDmaker::Check
@INC
INC
Test Failure:
Subject: FAIL Test-STDmaker-0.12 ppc-linux 2.4.19-4a From: alian@cpan.org (CPAN Tester + CPAN++ automate)
Perl lib version (v5.8.4) doesn't match executable version (v5.6.0) at /usr/local/perl-5.8.4/lib/5.8.4/ppc-linux/Config.pm line 32. Compilation failed in require at /usr/local/perl-5.8.4/lib/5.8.4/FindBin.pm line 97. BEGIN failed--compilation aborted at /usr/local/perl-5.8.4/lib/5.8.4/FindBin.pm line 97. Compilation failed in require at temp.pl line 8.
Analysis:
Line 8 is a backtick `perl $command`. To get to line 8 everything must going well. Thus, suspect that the test harness perl executable is different than the command line perl executable.
Corrective Action
Introduced the perl_command subroutine that uses $^X to return the current executable Perl. Use the results of this subroutine instead of 'perl' in backticks. See how it goes.
perl_command
$^X
Opps. Have `perl $commands` not only in the Unit Under Test (UUT) but also the test scripts. Looks like using `$^X $command` fixed the UUT so change the ones in the test script also.
`perl $commands`
Subject: FAIL Test-STDmaker-0.14 sparc-linux 2.4.21-pre7 From: alian@cpan.org (alian) t/Test/STDmaker/STDmaker....Can't locate object method "t edit anything before __DATA_. Edit ...
The text begin picked up in method comes from Test::STDmaker::STD.pm
Test::STDmaker::STD.pm
# Don't edit anything before __DATA_. Edit instead
within a <<'EOF' here statement.
Corrective Action:
Change the "Don't" to "Do not"
Subject: FAIL Test-STDmaker-0.15 ppc-linux 2.4.19-4a From: alian@cpan.org (CPAN Tester + CPAN++ automate) t/Test/STDmaker/STDmaker....Missing right curly or square bracket at temp.pl line 331, at end of line syntax error at temp.pl line 331, at EOF
Backed out test descriptions that producde curly brackets except for BEGIN and END blocks of generated scripts. The backed test descriptions are added to the advance.t test script that will not be distributed until get some green PASSES for the basic.t test script.
BEGIN
END
advance.t
basic.t
Subject: FAIL Test-STDmaker-0.18 i386-netbsd 1.6 From: alian@cpan.org (Cpan Tester - CPAN++ Automate ) "my" variable $expected1 masks earlier declaration in same scope at tgA1.d line 203. "my" variable $x masks earlier declaration in same scope at tgA1.d line 228. "my" variable $y masks earlier declaration in same scope at tgA1.d line 233.
Opening a new tmaker for test 9, involked File::Maker load methods a second time for the same program module __DATA__ section. While these work under Windows, they are completely messed up under Unix.
tmaker
File::Maker
__DATA__
Changed the order of the test script so tmaker never created with the new subroutine for the same file object. Add making File::Maker work with loading the __DATA__ twice after loading the program module on the todo list.
new
Subject: FAIL Test-STDmaker-0.21 sparc-linux 2.4.21-pre7 From: alian@cpan.org (alian) t/Test/STDmaker/STDmaker....FAILED tests 20, 22-24
No error stack output yet failing tests. There are only 21 tests.
Found where main test script redirecting STDERR output to STDOUT. Removed it. This is needed for the test case scripts that are ran by the main scripts in order to grab STDERR output to compare with expected results.
Split the test script into basic.t and advance.t and moved the last three tests to the advance.t test script. The focus will be to baseline with the basic.t test script only. Once have a baseline with some Passes, work on getting the advance.t to pass on multi-platforms.
Some passes, a Failure:
From: mhoyt@houston.rr.com Subject: FAIL Test-STDmaker-0.22 darwin-thread-multi-2level 7.0
t/Test/STDmaker/basic....# Test 9 got: "1..11 todo 3 6; ok 1 - Quiet Code ok 2 - Pass test ok 3 - Todo test that passes # (xxxx.t at line 000 TODO?!) not ok 4 - Test that fails # Test 4 got: \"6\" (xxxx.t at line 000) # Expected: \"7\"\nok 5 - Skipped tests # skip not ok 6 - Todo Test that Fails
"1..11 todo 3 6; ok 1 - Quiet Code ok 2 - Pass test ok 3 - Todo test that passes # (xxxx.t at line 000 TODO?!) not ok 4 - Test that fails # Test 4 got: '6' (xxxx.t at line 000) # Expected: '7'\nok 5 - Skipped tests # skip not ok 6 - Todo Test that Fails
Most Perls return single quotes around numbers; however, darwin-thread-multi-2level 7.0, and probably others return double quotes. This could be a function of the Test module version.
Test
Added code to &Test::Scrub::scrub_file_line to change double quotes around numbers to single quotes
&Test::Scrub::scrub_file_line
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.
There are no related documents needed for the installation and test of this release.
Instructions for installation, installation tests and installation support are as follows:
To installed the release package, 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:
Right click on 'Test-STDmaker-0.23.tar.gz' and download to a temporary installation directory. Enter the following where $make is 'nmake' for microsoft windows; otherwise 'make'.
gunzip Test-STDmaker-0.23.tar.gz tar -xf Test-STDmaker-0.23.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
VERY IMPORTANT:
The distribution package contains the cover bin/tmake.pl perl command script. Manually copy this into the execution path in order to use STDmaker from the command line. Rename it if there is a name conflict or just do not like the name.
bin/tmake.pl
STDmaker
'File::AnySpec' => '1.1', 'File::Package' => '1.1', 'File::Where' => '1.16', 'File::SmartNL' => '1.1', 'Text::Replace' => '1.08', 'Text::Column' => '1.08', 'File::Maker' => '0.03', 'Tie::Form' => '0.02', 'Tie::Layers' => '0.04', 'Test::Harness' => '2.42', 'Data::Startup' => '0.02',
None.
Most Perl installation software will run the following test script(s) as part of the installation:
t/Test/STDmaker/basic.t
If there are installation problems or questions with the installation contact
Introduce the advance.t test script and get it to pass on Unix type machines.
The following are useful acronyms:
extension for a Perl demo script file
extension for a Perl Library Module
extension for a Perl test script file
Data Item Description
Plain Old Documentation
Software Test Description
Software Version Description
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '©'. Assuming CP1252
To install Test::STDmaker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::STDmaker
CPAN shell
perl -MCPAN -e shell install Test::STDmaker
For more information on module installation, please visit the detailed CPAN module installation guide.