Access keys

AbstractTestSuiteResult

Kind of class: class
Inherits from: AbstractTestResult < BasicClass
Known subclasses:
Author: Simon Wacker
Classpath: org.as2lib.test.speed.AbstractTestSuiteResult
File last modified: Monday, 27 June 2005, 12:35:44
AbstractTestSuiteResult provides implementations of methods needed by
implementations of the org.as2lib.test.unit.TestSuiteResult interface.

Class properties

AVERAGE_TIME

static AVERAGE_TIME:Number = 2
(read,write)
Sort by average time.

METHOD_INVOCATION_COUNT

static METHOD_INVOCATION_COUNT:Number = 4
(read,write)
Sort by method invocation count.

METHOD_INVOCATION_PERCENTAGE

static METHOD_INVOCATION_PERCENTAGE:Number = 5
(read,write)
Sort by method invocation percentage.

METHOD_INVOCATION_SUCCESSION

static METHOD_INVOCATION_SUCCESSION:Number = 6
(read,write)
Sort by the succession of method invocations.

NAME

static NAME:Number = 0
(read,write)
Sort by name.

TIME

static TIME:Number = 1
(read,write)
Sort by time.

TIME_PERCENTAGE

static TIME_PERCENTAGE:Number = 3
(read,write)
Sort by time percentage.

Instance methods

addTestResult

function addTestResult (
testResult:TestResult) : Void
Adds a new sub-test result.

If testResult is null or undefined it wll be
ignored, this means not added.

Parameters:
testResult:
the new test result to add

getAllMethodInvocations

function getAllMethodInvocations (
Void) : Array
Returns all profiled method invocations as MethodInvocation instances.
Returns:
all profiled method invocations as MethodInvocation instances

getAverageTime

function getAverageTime (
Void) : Number
Returns the time needed per method invocation.
Returns:
the time needed per method invocation

getMethodInvocationCount

function getMethodInvocationCount (
Void) : Number
Returns the total number of method invocations.
Returns:
the total number of method invocations

getMethodInvocationPercentage

function getMethodInvocationPercentage (
totalMethodInvocationCount:Number) : Number
Returns the percentage of method invocations in relation to the passed-in
totalMethodInvocationCount.
Parameters:
totalMethodInvocationCount:
the total number of method invocations to
calculate the percentage with
Returns:
the percentage of method invocations of this result

getTestResultCount

function getTestResultCount (
Void) : Number
Returns the number of direct sub-test results.
Returns:
the number of direct sub-test results

getTestResults

function getTestResults (
Void) : Array
Returns all test results as org.as2lib.test.unit.TestResult instances directly of this test
suite.
Returns:
all test results of this test suite

hasMethodInvocations

function hasMethodInvocations (
Void) : Boolean
Returns whether this test suite result has any method invocations.
Returns:
true if this test suite result has method invocations else
false

hasTestResults

function hasTestResults (
Void) : Boolean
Returns whether this test suite result has sub-test results.
Returns:
true if this test suite has sub-test results else false

sort

function sort (
property:Number, descending:Boolean) : Void
Sorts this test suite result and its sub-test results.

Supported sort properties are:

Parameters:
property :
the property to sort by
descending:
determines whether to sort descending true or
ascending false