DTS_UT::Model::UnitTest - class that represents the test to be executed with DTS packages.
DTS_UT::Model::UnitTest is the test that will be executed again the desired DTS package(s).
DTS_UT::Model::UnitTest
This class is based in Test::More and Test::Builder features. Test::Builder is specially necessary because of the methods output and reset that will change, respectivally, the default output (STDOUT) to a file and will reset the tests and results from previous execution.
Test::More
Test::Builder
output
reset
The file where the output will be redirected is a temporary file (see File::Temp) that will be removed as soon the test is finished and results read.
Since Test::Builder object is a singleton, at the end of each test it's state must be reseted to start a new test without changing it's results.
With such implementation, DTS_UT::Model::UnitTest can be executed N times against DTS packages without exporting lots of subroutines of Test::More into main namespace. By using a temporary file for test output, it can be used with environments like mod_perl once it avoids doing system calls by calling the perl program to execute the test and read the output.
Nothing.
Expects as a parameter an hash reference like defined in Win32::SqlServer::DTS::Application.
Returns a DTS_UT::Model::UnitTest object.
Executes the test agains a given DTS package.
Expects as parameter the name of a DTS package.
Returns the complete pathname of the temporary file where the results of the test are written. Beware that if the DTS_UT::Model::UnitTest goes out of scope (and it's reclaimed by garbage collector), the temporary file will be removed automatically!
test_flat_file_conns
fetch_flat_file_conns
fetch_execute_pkgs
test_execute_pkgs
test_pkg_log_auto_conf
test_exec_pkg_auto_conf
test_datapumps
test_conn_auto_cfg
fetch_conns
DTS_UT::Test::Harness::Straps::Parameter
Win32::SqlServer::DTS::Application
File::Temp
Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>
Copyright (C) 2008 by Alceu Rodrigues de Freitas Junior
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Win32::SqlServer::DTS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::SqlServer::DTS
CPAN shell
perl -MCPAN -e shell install Win32::SqlServer::DTS
For more information on module installation, please visit the detailed CPAN module installation guide.