Perl - Testing

perl

http://www.oreillynet.com/onlamp/blog/2005/08/why_use_perl_for_software_test.html
https://www.perl.com/pub/2001/12/04/testing.html
http://www.jmdeldin.com/bioinf/testing/index.html

http://www.perlmonks.org/?node_id=469927
https://perlmaven.com/testing-a-simple-perl-module

https://www.perl.com/pub/2005/07/21/test_mockdbi.html
https://www.perl.com/pub/2005/02/10/database_kata.html
http://www.perlmonks.org/?node_id=692890

Devel::Cover;
Test::Unit;
perlUnit

package FooBar;
use base qw(Test::Unit::TestCase);
sub new {
    my $self = shift()->SUPER::new(@_);
    # your state or fixture goes here
    return $self;
}
sub set_up {
    # fixture
}
sub tear_down {
    # code to clean up after test
}
sub test_foo {
    my $self = shift;
    my $obj = ClassUnderTest->new(...);
    $self->assert_not_null($obj);
    $self->assert_equals('expected',$obj->foo);
}

TestRunner.pl My::TestCase::Class

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License