Result |
![]() |
Result - result definition class
Shane P. McCarron <shane@aptest.com>
Copyright 1999-2009 Applied Testing and Technology, Inc. All Rights Reserved.
use Results; # create a schema object my $results = new Results(suiteName); # get a description associated with a result $desc = $results->description($res)
$results = new Results(suite[, profName [, resPath ] ] );
Creates a new results object.
the name of a test suite to access.
the name of the profile to manipulate.
a path to a results file (for testing).
returns a reference to the results object.
$output = $results->as_popup(varname, current, fn);
varname is the name of the HTML variable to use
current is the currently selected item.
fn is a function to invoke on change.
Returns a select and option set that uses the name varname, with the item current selected (if defined).
$output = $results->as_radio(varname, current, fn);
varname is the name of the HTML variable to use
current is the currently selected item.
fn is a function to call on change.
Returns a set of radio buttons that use the name varname, with the item current selected (if defined).
$output = $results->as_html(result);
Returns the HTML version of the result, including appropriate colors.
$realResult = $results->averageResult( resList ) ;
resList is a list of 2 or more result codes. This method will look at all of them, returning the result which is is the most prevalent (e.g., the modal average), rounding toward the worse in the event of a tie.
Returns the result code for the average result from the list.
$realResult = $results->bestResult( resList ) ;
resList is a list of 2 or more result codes. This method will look at all of them, returning the result which is classified as the "best" by the result definitions. In this case, that means the result that is earliest in the result file.
Returns the result code for the best result from the list.
$realResult = $results->worstResult( resList ) ;
resList is a list of 2 or more result codes. This method will look at all of them, returning the result which is classified as the "worst" by the result definitions. In this case, that means the result that is latest in the result file.
Returns the result code for the worst result from the list.
$color = $results->color(resname)
resname is the name of a result to look up.
Returns the color associated with the result, or undef if the color is not defined.
$desc = $results->description();
$hRef = $results->olist() ;
$res = $results->resByStatus( status )
status is an exit status.
Returns the result associated with that status code, or undef if no result is found.
@list = $results->rlist();
$hRef = $results->slist() ;
$results->numResults();
returns the number of results defined for the suite
$ord = $results->ordinal(resName) ;
Returns the position of the result in the list, or undef if the result name is not defined.
Really a no-op, since this object does not have a database.
$stat = $results->status();
@rlist = $resH->sortedRlist( [rlist] ) ;
rlist is an option array of results that need to be ordered.
Returns the list after ordering it to match what is in results file.
Copyright © 2000-2009 Applied Testing and Technology, Inc. All rights reserved.