Upgrade Notice

The CPAN Testers Wiki site has been upgraded since you last accessed the site. Please press the F5 key or CTRL-R to refresh your browser cache to use the latest javascript and CSS files.

TestDuringInstall

The easiest way to contribute to CPAN Testers is by setting up your system so that whenever you install a CPAN module, the test results will be automatically submitted.

Setup is slightly different depending whether you use CPAN.pm, CPANPLUS or cpanminus to install modules.

CPAN.pm

From the CPAN shell, install the following module:

  • Task::CPAN::Reporter

Quit and restart the shell, then enter the following command to configure your system:

o conf init test_report

Here you then be asked a series of questions:

 Generate test reports if CPAN::Reporter is installed (yes/no)? [no] yes
 Would you like me configure CPAN::Reporter now? [yes] <enter>
 email_from? [] example@example.com
 edit_report? [default:ask/no pass/na:no] <enter>
 send_report? [default:ask/yes pass/na:yes] <enter>
 transport? [Metabase uri https://metabase.cpantesters.org/api/v1/ id_file metabase_id.json] <enter>
 Would you like to run 'metabase-profile' now to create '/root/.cpanreporter/metabase_id.json'? [y] <enter>

Answering 'yes' to the first question turns on the ability to generate test reports. Yes we want to configure CPAN::Reporter now too. The email_from is used by the module author to get in touch.

The next two questions allow you to decide in which case you want to edit and submit test reports. The suggested defaults are best for users who are intending to submit reports as they are installing them. It is recommended to use the default setting for the final two questions.

Once you've answered all the questions, type

o conf commit

to save your settings.

Exit from the CPAN shell, then add the following line to the ~/.cpanreporter/config.ini file:

transport = Metabase uri https://metabase.cpantesters.org/api/v1/ id_file ~/.cpantesters/metabase_id.json

Finally you need to create a CPAN Testers profile. This is accomplished by running the 'metabase-profile' tool.

$ mkdir ~/.cpantesters
$ cd ~/.cpantesters
$ metabase-profile

Answer each question prompt. The generated JSON file can actually be placed anywhere, just change the "id_file" parameter of the "transport" key in the configuration file; see below for details.

$ chmod 400 metabase_id.json

Congratulations, you are now a CPAN Tester!

From now on, test results will be sent whenever you install a module using CPAN.pm.

If you watch carefully as you install modules you are likely to see something like this,

CPAN::Reporter: Test result is 'pass', 'make test' no errors.
CPAN::Reporter: preparing a CPAN Testers report for XML-Parser-2.40
CPAN::Reporter: sending test report with 'pass' via Metabase

You'll also be able to see your submission on the CPAN Testers logfile at http://metabase.cpantesters.org/tail/log.txt.

CPANPLUS

cpanminus

Test results uploading is supported by App::cpanminus::reporter by Breno G. de Oliveira.