# file: t/helper.pm package t::helper; @EXPORT = qw( run_all_tests ); use strict; use warnings; use base 'Exporter'; use Test::More; sub run_all_tests { my ($obj, $prefix) = @_; diag "Starting tests for $prefix"; isa_ok( $obj, "Parent::Class", "$prefix: object isa Parent::Class" ); ok( $obj->true(), "$prefix: true() is true" ); # more tests ... } 1; #### # file: t/001.t use Test::More 'no_plan'; use t::helper; my @cases = ( Parent::Class->new(), Sub::Class->new(), ); for my $o ( @objs ) { run_all_tests( $o, ref $o ); }