Package gavo :: Package rscdef :: Module regtest :: Class TestRunner
[frames] | no frames]

Class TestRunner

source code

object --+
         |
        TestRunner

A runner for regression tests.

It is constructed with a sequence of suites (RegTestSuite instances) and allows running these in parallel. It honors the suites' wishes as to being executed sequentially.

Instance Methods
 
__init__(self, suites, serverURL=None, verbose=True, dumpNegative=False, tags=None, timeout=45, failFile=None, nRepeat=1, execDelay=0, nThreads=8, printTitles=False, keywords=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
runOneTest(self, test, threadId, execDelay)
runs test and puts the results in the result queue.
source code
 
runTests(self, showDots=False)
executes the tests in a random order and in parallel.
source code
 
runTestsInOrder(self)
runs all tests sequentially and in the order they were added.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods
 
fromRD(cls, rd, **kwargs)
constructs a TestRunner for a single ResourceDescriptor.
source code
 
fromSuite(cls, suite, **kwargs)
constructs a TestRunner for a RegTestSuite suite
source code
 
fromTest(cls, test, **kwargs)
constructs a TestRunner for a single RegTest
source code
Properties

Inherited from object: __class__

Method Details

__init__(self, suites, serverURL=None, verbose=True, dumpNegative=False, tags=None, timeout=45, failFile=None, nRepeat=1, execDelay=0, nThreads=8, printTitles=False, keywords=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

runOneTest(self, test, threadId, execDelay)

source code 

runs test and puts the results in the result queue.

This is usually run in a thread. However, threadId is only used for reporting, so you may run this without threads.

To support sequential execution, if test has a followUp attribute, this followUp is queued after the test has run.

If the execDelay argument is non-zero, the thread delays its execution by that many seconds.