NAME

TestSet - class representing a test set

AUTHOR

Shane P. McCarron <shane@aptest.com>

COPYRIGHT

Copyright 2002-2011 Applied Testing and Technology, Inc. All Rights Reserved.

SYNOPSIS

use TestSet;

    # create an empty test set;
    my $set = new TestSet();

    # get the settings for a selector
    $setRef = $set->selector($field);

    # set the value of a selector
    $value = $set->selector($field, $value);

    # save the test set
    $res = $set->save($name);

A TestSet is a sub-class of TestSession. It contains the settings that act as a pattern to use when creating a session.

new - create a item

copy - copy another set object's data into this one

testSession - accessor for testSession list

$session = $set->testSession(sessionId, description);
sessionId

the numeric identifier of the session as a 4 digit string. If this is a hash ref, it reflects a complete collection of session data to attach to this set.

description

the description of the test session. If sessionId is defined and this is not defined, then the session is removed from the list.

returns the description of the session.

path - get the path to the set

returns a path to the session, or undef if the session does not have a user and sessionId.

isStatic - accessor to test whether the set is static

$state = $set->isStatic([state]);

This method will get/set whether the set has a static collection of test cases, or whether the test cases refresh themselves whenever the list is accessed.

refresh - reset the test list and variables on the fly

$set->refresh();

This method will rerun the _getTests logic and grab any new tests that match the original criteria and are NOT marked as disabled already in the object. It will also remove any tests that no longer match the selection criteria, including removing them from the "disabled" collection.

save - save the testset

$result = $set->save(dbmFlag, setName);

dbmFlag - a boolean that indicates whether it should be a DBM or not. note that this is currently ignored - test sets are always serialized objects, not DBM files.

setName - the name to use for a new test set.

Returns the set name on success, and undef on failure.

group - accessor for set group

$group = $set->group( [ groupName ] ) ;

groupName is the name of a set group to join.

Returns the current group this set is a member of, or undef if it is a member of no set group.

updateSuiteDB - update the suite database

Updates the associated SuiteDB, if there is one, with data from the set that needs to be quickly available.

Returns undef if there is no SuiteDB associated with this set, 0 if the update failed, and 1 if it succeeded.

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