Class org.as2lib.test.speed.TestSuite

org.as2lib.core.BasicClass
   +--org.as2lib.test.speed.AbstractTest
      +--org.as2lib.test.speed.TestSuite

Implemented Interfaces

Test

Description

TestSuite is the core interface for standardized performance test suites.

Test suites hold multiple Test instances, including TestCase, instances, TestSuite instances and instances of your custom Test implementations.

Field Index

Inherited from AbstractTest

CLASS, METHOD, METHOD_INVOCATION, METHOD_INVOCATION_TREE, NONE, PACKAGE

Method Index

new TestSuite()

addTest(), addTestByMethod(), addTestByProperty(), addTestByTest(), getName(), getTests(), run()

Inherited from AbstractTest

getResult()

Inherited from BasicClass

toString()

Constructor Detail

TestSuite

public function TestSuite(name:String, tests:Array)

Constructs a new TestSuite instance.

If the passed-in tests array contains elements that are not of type Test, they will be ignored.

Parameters

namethe name of this test suite
tests(optional) Test instances to populate this test suite with

Method Detail

run

public function run(Void):Void

Runs all added tests.

Specified By

run() in org.as2lib.test.speed.Test

getName

public function getName(Void):String

Returns this test suite's name.

Return

this test suite's name

addTest

public function addTest()

addTestByTest

public function addTestByTest(test:Test):Void

Adds the passed-in test to this test suite.

If the argument test is null or undefined this method invocation will be ignored.

Parameters

testthe test to add

addTestByMethod

public function addTestByMethod(method:MethodInfo):Test

Adds a new test case by method.

If the argument method is null or undefined this method invocation will be ignored and null will be returned.

Parameters

methodthe method to profile

Return

the created and added test

addTestByProperty

public function addTestByProperty(property:PropertyInfo):Test

Adds a new test case by property.

If the argument property is null or undefined this method invocation will be ignored and null will be returned.

Parameters

propertythe property to profile

Return

the created and added test

getTests

public function getTests(Void):Array

Returns all tests of this test suite.

Return

all tests of this test suite