RT 3.8.17 Documentation

RT::Test

Go to latest version →

NAME

RT::Test - RT Testing

NOTES

COVERAGE

To run the rt test suite with coverage support, install Devel::Cover and run:

    make test RT_DBA_USER=.. RT_DBA_PASSWORD=.. HARNESS_PERL_SWITCHES=-MDevel::Cover
    cover -ignore_re '^var/mason_data/' -ignore_re '^t/'

The coverage tests have DevelMode turned off, and have named_component_subs enabled for HTML::Mason to avoid an optimizer problem in Perl that hides the top-level optree from Devel::Cover.

UTILITIES

load_or_create_user

load_or_create_queue

load_or_create_custom_field

get_relocatable_dir

Takes a path relative to the location of the test file that is being run and returns a path that takes the invocation path into account.

e.g. RT::Test::get_relocatable_dir(File::Spec->updir(), 'data', 'emails')

get_relocatable_file

Same as get_relocatable_dir, but takes a file and a path instead of just a path.

e.g. RT::Test::get_relocatable_file('test-email', (File::Spec->updir(), 'data', 'emails'))

← Back to index