ApTest Manager documentation: API: Framework

Framework

NAME

Framework - catchall package for broadly used methods

AUTHOR

Shane P. McCarron <shane@aptest.com>

COPYRIGHT

Copyright 2001-2006 Applied Testing and Technology, Inc. All Rights Reserved.

SYNOPSIS

use Framework ;

METHODS

templateDir - get the path to suite or profile templates

$path = Framework::templateDir(suite, profile) ;

suite is a suite to work with.

profile is a profile to work with.

Returns the path to the template collection for the suite or the profile.

If both suite and profile are defined, returns undef.

getTemplate - load a template

$contents = Framework::getTemplate(suite, template, strip, profile);

suite is the name of a suite to load from.

template is the name of the template to load.

strip is a flag that indicates whether to strip off comments or not. Defaults to false.

profile is the name of a profile to operate on instead of a suite.

Returns the contents of the referenced template. Returns undef if the template does not exist. Returns undef if both a suite and a profile are specified.

templatePath - get the path to a template file

$path = Framework::templatePath(suite, template[, library]);

suite is the test suite - if undefined, then go to the master templates

template is the template to load

profile is the optional profile from which to load the template. Note that this ONLY applies if suite is not defined.

Automatically references the "REPORTS" subfolder for things that end in ".rpt".

Returns the path to the template file, or undef if the file cannot be found

parseTemplate - get a template and break it down

($head, $body, $foot) = Framework::parseTemplate(suite, template, stripComments, profile);

returns the portion before any thead, the thead portion, the body portion, and the tfoot portion of the template so they can be used in the various portions of a template driven screen

makeUUID - return a unique identifier

$uuid = Framework::makeUUID();

compare - compare the data with another structure

$res = Framework::compare( ref1, ref2 );

Returns 1 if the data in ref1 matches the data in ref2. Returns 0 otherwise.

Copyright © 2000-2006 Applied Testing and Technology, Inc. All rights reserved.