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.
  GetClass(self)
Return the class of the entity.
  GetTest(self)
Return the 'Test' object described by this descriptor.
  GetPrerequisites(self)
Return a map from prerequisite test IDs to required outcomes.
  GetTargetGroup(self)
Returns the pattern for the targets that can run this test.
  Run(self, context, result)
Execute this test.

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

GetTest(self)

source code 
Return the 'Test' object described by this descriptor.

GetPrerequisites(self)

source code 
Return a map from prerequisite test IDs to required outcomes.

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.