qm :: test :: database :: TestDescriptor :: Class TestDescriptor
[hide private]
[frames] | no frames]

Class TestDescriptor

source code

ItemDescriptor --+
                 |
                TestDescriptor

A test instance.

Instance Methods [hide private]
 
__init__(self, database, test_id, test_class_name=None, arguments=None, test=None)
Create a new test instance.
source code
 
GetClass(self)
Return the class of the entity.
source code
 
GetTest(self)
Return the 'Test' object described by this descriptor.
source code
 
GetPrerequisites(self)
Return a map from prerequisite test IDs to required outcomes.
source code
 
GetTargetGroup(self)
Returns the pattern for the targets that can run this test.
source code
 
Run(self, context, result)
Execute this test.
source code

Inherited from ItemDescriptor: GetArguments, GetClassArguments, GetClassName, GetDatabase, GetId, GetItem, GetResources

Inherited from ItemDescriptor (private): _Execute

Method Details [hide private]

__init__(self, database, test_id, test_class_name=None, arguments=None, test=None)
(Constructor)

source code 

Create a new test instance.

'database' -- The 'Database' containing this test.

'test_id' -- The test ID.

'test_class_name' -- The name of the test class of which this is an instance. Omit this argument if 'test' is provided.

'arguments' -- This test's arguments to the test class. Omit this argument if 'test' is provided.

'test' -- The test class of which this is an instance.

Overrides: ItemDescriptor.__init__

GetClass(self)

source code 

Return the class of the entity.

returns -- The Python class object for the entity. For example, for a 'TestDescriptor', this method returns the test class.

Overrides: ItemDescriptor.GetClass

GetTargetGroup(self)

source code 

Returns the pattern for the targets that can run this test.

returns -- A regular expression (represented as a string) that indicates the targets on which this test can be run. If the pattern matches a particular group name, the test can be run on targets in that group.

Run(self, context, result)

source code 

Execute this test.

'context' -- The 'Context' in which the test should be executed.

'result' -- The 'Result' object for this test.