wiki:Features/AutomatedBuildAndTest

Version 13 (modified by bowtie, 4 years ago) (diff)

--

Description

Support for creating and running unit tests
Please take the following snipetts form Perldoc into account whilst reading this page.

  • @INC

The array @INC contains the list of places that the do EXPR , require, or use constructs look for their library files. It initially consists of the arguments to any -I command-line switches, followed by the default Perl library, probably /usr/local/lib/perl, followed by ".", to represent the current directory. ("." will not be appended if taint checks are enabled, either by -T or by -t .) If you need to modify this at runtime,

  • prove option switches
-v--verbosePrint all test lines.
-l--libAdd 'lib' to the path for your tests (-Ilib).
-b--blibAdd 'blib/lib' and 'blib/arch' to the path for your tests


Padre Run Tests

Run -> Run Tests

This will process your Skeleton and your additional test files, located within /t directory structure

SkeletonAction
Module::Build./Build test
Module::Installmake test
ExtUtils::MakeMakermake test

Run -> Run Build and Tests

This will Build/make depending on your Skeleton.

SkeletonAction
Module::Build./Build
Module::Installmake
ExtUtils::MakeMakermake

followed by Run Tests.

Run -> Run This Test

This will process your Active test script in Padre editor, test script should have .t extension (otherwise option, will be greyed out)

SkeletonAction
Anyprove -bv $filename

Tickets

Ticket Resolution Summary Owner Reporter
#1432 fixed task manager test segfaults with DBI >= 1.619 alias, adamk dod
#1210 fixed 76-preferences.t fails while passing all the tests szabgab claudio
#1202 fixed Add separation bar bowtie
#1187 fixed Run This Test szabgab bowtie
#281 wontfix TDD using Padre szabgab
#65 fixed Add capability to run the unit tests of a project szabgab

Test

Setup

  • Module::Build (MB)
    • module-starter --mb --module=Module::Build --author="Fred Bloggs" --email=fb@bloggs.com --verbose
  • ExtUtils::MakeMaker (EUMM)
    • module-starter --eumm --module=ExtUtils::MakeMaker --author="Fred Bloggs" --email=fb@bloggs.com --verbose
  • Module::Install (MI)
    • module-starter --mi --module=Module::Install --author="Fred Bloggs" --email=fb@bloggs.com --verbose

or you could use, Padres Skeleton Builder ProjectSkeletonGeneration


All test run in order left -> right

Test 1

run against a vanilla build.

Run This TestRun TestRun Build and TestRun Tests
EUMMPassFailFailFail
MBPassFailFailFail
MIFailFailFailFail

Test 2

run against a vanilla build, followed by:

  • EUMM perl Makefile.Pl
  • MB perl Build.PL
  • MI perl Makefile.PL
Run This TestRun TestRun Build and TestRun Tests Run This Test
EUMMPassFailPassPassPass
MBPassFailPassPassPass
MIFailFailPassPassPass

Test 3

run against a vanilla build.

Padre/lib/Padre/Wx/Main.pm
sub on_run_this_test {
line 2590 approx.

$self->run_command("$prove -lv $filename");
Run This TestRun TestRun Build and TestRun Tests
EUMMPassFailFailFail
MBPassFailFailFail
MIPassFailFailFail

TODO

Attachments (1)

Download all attachments as: .zip