Test::STDmaker::STD - generates a STD POD from a test description short hand
The Test::STDmaker::STD package is an internal driver package to the Test::STDmaker package that supports the Test::STDmaker::tmake() method. Any changes to the internal drive interface and this package will not even consider backward compatibility. Thus, this POD serves as a Software Design Folder documentation the current internal design of the Test::STDmaker and its driver packages.
Test::STDmaker::STD
Test::STDmaker
The Test::STDmaker::STD package inherits the methods of the Test::STDmaker package. The Test::STDmaker build generate and <print> methods directs the Test::STDmaker::STD to perform its work by calling its methods.
build
generate
The Test::STDmaker::STD package methods use the Tie::Form methods to encode a STD POD and STD form database from the internal database checked by the Test::STDmaker::STD package methods. The Test::STDmaker package takes this data from the Test::STDmaker::STD package methods and generates a STD program module with a fresh POD and a checked __DATA__ form database with correctly counted ok fields. The Test::STDmaker::STD package useful product is tables that trace requirements to tests and test headers that may be used to link (cite) tests in the tracebility matrices and other PODs.
__DATA__
ok
During the course of the processing the Test::STDmaker::STD package maintains the following in the $self object data hash:
$self
flags that the test description is for demo only
cumulative fields for the __DATA__ form section
list of requirements for a test
short hand test descriptions for a test
cumulative test descriptions POD
cumulative requirements to test hash
cumulative test to requirements hash
The Test::STDmaker::STD package processes following options that are passed as part of the $self hash from Test::STDmaker methods:
The file specification for the files in the __DATA__ form database.
$file_data = A($command, $actual-expression );
The A subroutine formats $command,$actual-expression in the Tie::Form format and adds it to both the $test and $fields object data.
A
$command,$actual-expression
$test
$fields
If demo_only exists, the A subroutine resets the demo_only flag and adds a new line to both the $test and $fields object data.
demo_only
$file_data = DO($command, $comment);
The DO subroutine formats $command,$actual-expression in the Tie::Form format and adds it to both the $test and $fields object data.
DO
The subroutine sets the $demo_only flag.
$demo_only
$file_data = ok($command, $test_number)
If a ok test description short hand is in a loop, test_number will contain multiple numbers. The ok splits $test_number into separate tests and enters all combinations of the tests and the @requirements object data into the %test_req and %req_test object data; after which, the subroutine resets @requements to an empty list. The ok subroutine formats $command, $test_number in the Tie::Form format and adds it to both the $test and $fields object data. The T subroutine adds a ok header followed by the $test formated short hand test descriptions to the $Test_Description object data and resets the $test object data to a empty string. The subroutine returns an empty string for $file_data.
test_number
$test_number
@requirements
%test_req
%req_test
@requements
$command, $test_number
T
$Test_Description
$file_data
$file_data = R($command, $requirement_data)
The R subroutine formats $command, $requirement_data in the Tie::Form format and adds it to both the $test and $fields object data. The R subroutine splits the $requirement_data into individual requirements and adds them to @requirments. The subroutine returns an empty string for $file_data.
R
$command, $requirement_data
$requirement_data
@requirments
$file_data = T($command, $tests )
The T subroutine formats $command, $data in the Tie::Form format and adds it to both the $test and $fields object data. The T subroutine adds a test plan header followed by the $test formated short hand test descriptions to the $Test_Description object data and resets the $test object data to a empty string. The subroutine returns an empty string for $file_data.
$command, $data
The AUTOLOAD routine formats $command, $data in the Tie::Form format and adds it to both the $test and $fields object data.
AUTOLOAD
$file_data = finish()
The finish subroutine encodes and adds the last adminstrative fields to the fields object data, builds the __DATA_ form database record, builds and adds the tracebility tables from the %test_req and %req_test hash to the Test_Description object data, uses a build-in template and Test_Description to build the STD POD, puts it all together and returns it in $file_data to the Test::STDmaker package methods.
finish
fields
__DATA_
Test_Description
$file_data = start()
The <start> subroutine initializes the object data, and starts the fields object data by adding encoded adminstrative fields. The subroutine returns an empty string for $file_data.
The holder of the copyright and maintainer is
E<lt>support@SoftwareDiamonds.comE<gt>
Copyrighted (c) 2002 Software Diamonds
All Rights Reserved
Binding requirements are indexed with the pharse 'shall[dd]' where dd is an unique number for each header section. This conforms to standard federal government practices, STD490A 3.2.3.6. In accordance with the License, Software Diamonds is not liable for any requirement, binding or otherwise.
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 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://www.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 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.
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.