Integrator::Module::Build - Gather and synchronize Test::More results in Cydone's Integrator
Version $Revision: 1.57 $
This module is used to construct perl test harnesses suitable for use with Cydone's Integrator framework. A test harness created with Integrator::Module::Build can communicate test results in the style of Test::More to Cydone Integrator and synchronise test information (test cases, descriptions, results, log files, measurements, component states, etc.)
Since the test harness itself is nothing less than a standard perl module, you can use Module::Start to create a new test harness. Here is an example on how to create a test harness called 'my-test-module' using the module-starter script available from Module::Starter:
module-starter --mb \ --firstname.lastname@example.org' \ --author='User Name' \ --module='My::Test::Module'
Then, you want to edit the Build.PL file under My-Test-Module with the proper Integrator credentials (go to https://www.partnerscydone.com to request your demo credentials, a specific Build.PL file will be sent to you within a demo test harness).
Here is a typical Build.PL file used to instantiate such a perl test harness (note the 'Integrator::Module::Build' lines):
use strict; use warnings; use Integrator::Module::Build; my $builder = Integrator::Module::Build->new( module_name => 'My::Test::Module', dist_author => ' <email@example.com>', integrator_project_code => 'demo', integrator_lab_code => 'default', integrator_user => 'your username', integrator_pwd => 'the password you received', integrator_url => 'https://public1.partnerscydone.com', integrator_http_realm => '', integrator_http_user => '', integrator_http_pwd => '', ); $builder->create_build_script();
You can now create/edit the test case files (based on Test::Simple or Test::More style) under the ./t directory in your new test module and synchronize the results in Integrator.
To execute the test cases and synchronize the results do:
perl ./Build.PL ./Build ./Build integrator_test ./Build integrator_sync
Integrator::Module::Build exports a set of actions available from the command line 'Build' script, in the style of what Module::Build does.
Integrator::Module Build supports all actions from Module::Build and adds specific actions to execute tests in the local database as well as to synchronise test results with Cydone's Integrator centralized server.
The specific actions of Integrator::Module::Build are:
Usage: ./Build <action> arg1=value arg2=value ... Example: ./Build test verbose=1 Actions defined: integrator_test integrator_sync integrator_version integrator_send_xml integrator_store integrator_xml_report integrator_download_test_definition integrator_upload_test_definition
As of July 2007, Module::Build was in revision 0.2808. The most common actions inherited from Module::Build are:
dist - used to wrap a complete test module into a tar.gz. file. (this is very useful to distribute your tests in a portable module) help - displays a help message
Actions starting with 'integrator' are defined in this document. Please refer to Module::Build by Ken Williams available at http://www.cpan.org for the other actions, as they are more related to module distribution, installation and maintenance.
Since this module is used to generate a local 'Build' file called with actions, we first document these actions. Please note that all the actions are called from the command line without the 'ACTION_' prefix as in:
./Build integrator_test --test_files=./t/00-load.t #launches one test and logs the result locally #notice the bare 'integrator_test' action
used with: ./Build integrator_test ./Build integrator_test --test_files=./t/00-load.t \ --test_files=./t/tc001_v1_security.t \ --test_files=./t/tc002_v3_robustness.t
This action is used to start a test run and gather the results locally for later upload and analysis in Cydone Integrator. Each sucessive invocation is logged as a unique test run and can latter be uploaded with the 'integrator_sync' action.
used with: ./Build integrator_sync
This action will send locally generated test run data to the web server and will clean-up local data when the transaction is completed. Aditionally, all configuration data related to the local test files will be updated (note: the configuration data sync is not yet implemented as of March 2006).
Credentials are looked-up from the local Build.PL configuration file or prompted from the user if required.
All local configuration (ENV variables, build parameters, server configuration) are also uploaded to the server to ensure test traceability. Please refer to Cydone Integrator for a detailed list of the information that is sent to the server.
used with: ./Build integrator_version
Displays the Integrator::Module::Build version currently running.
used with: ./Build version
See integrator_version ...
used with: ./Build integrator_store
This action is used as a patch to help load externally generated XML. This is used only as a debugging mechanism...
used with: ./Build integrator_download_test_definition ./Build integrator_download_test_definition --file=complete_this.xml
This action is used to download all test definition data from the current project in Cydone Integrator.
used with: ./Build integrator_send_xml ./Build integrator_send_xml --file=commands_api.xml
This action is used to send a an xml api file to Cydone Integrator.
used with: ./Build integrator_upload_test_definition ./Build integrator_upload_test_definition --file=definition.xml
This action is used to send a test definition xml file to Cydone Integrator.
used with: ./Build integrator_xml_report
This action is used to generate a signed xml representation of all the test runs launched with the 'integrator_test' action since the last sync to the server. This action *will not* modify the local data, so it can be used as often as needed.
To remain compatible with Cydone Integrator, this action requires that the user provides some credential information. All of this data is first read from the Build.PL configuration file or prompted from the command-line if more information is required.
Francois Perron, Cydone Solutions Inc.
Please report any bugs or feature requests to
bug-integrator-module-build at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Integrator-Module-Build. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc or man commands.
perldoc Integrator::Module::Build man Integrator::Module::Build
This module would not have been possible without the great contributions by Ken Williams, Andy Lester, chromatic, Michael G Schwern and all folks involved in the creation of Test::... , Module::Build, Module::Starter and supporting modules.
Copyright 2007 Cydone Solutions Inc, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.