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 --verbose Print all test lines. -l --lib Add 'lib' to the path for your tests (-Ilib). -b --blib Add 'blib/lib' and 'blib/arch' to the path for your tests
Run -> Run Tests
This will process your Skeleton and your additional test files, located within /t directory structure
Skeleton | Action |
Module::Build | ./Build test |
Module::Install | make test |
ExtUtils::MakeMaker | make test |
Run -> Run Build and Tests
This will Build/make depending on your Skeleton.
Skeleton | Action |
Module::Build | ./Build |
Module::Install | make |
ExtUtils::MakeMaker | make |
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)
Skeleton | Action |
Any | prove -bv $filename |
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 Project Skeleton Generation
All test run in order left -> right
Test 1
run against a Vanilla build.
Run This Test | Run Test | Run Build and Test | Run Tests | |
EUMM | Pass | Fail | Fail | Fail |
MB | Pass | Fail | Fail | Fail |
MI | Fail | Fail | Fail | Fail |
Test 2
run against a vanilla build, followed by:
- EUMM perl Makefile.PL
- MB perl Build.PL
- MI perl Makefile.PL
Run This Test | Run Test | Run Build and Test | Run Tests | Run This Test | |
EUMM | Pass | Fail | Pass | Pass | Pass |
MB | Pass | Fail | Pass | Pass | Pass |
MI | Fail | Fail | Pass | Pass | Pass |
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 Test | Run Test | Run Build and Test | Run Tests | |
EUMM | Pass | Fail | Fail | Fail |
MB | Pass | Fail | Fail | Fail |
MI | Pass | Fail | Fail | Fail |