class documentation
class DistTrialRunner: (source)
A specialized runner for distributed trial. The runner launches a number of local worker processes which will run tests.
| Method | __init__ |
Undocumented |
| Method | create |
Create local worker protocol instances and return them. |
| Method | launch |
Spawn processes from a list of process protocols. |
| Method | run |
Spawn local worker processes and load tests. After that, run them. |
| Method | run |
Run the tests with local worker processes until they fail. |
| Method | write |
Write test run final outcome to result. |
| Method | _drive |
Drive a LocalWorkerAMP instance, iterating the tests and calling run for every one of them. |
| Method | _make |
Make reporter factory, and wrap it with a DistReporter. |
| Instance Variable | _log |
Undocumented |
| Instance Variable | _log |
Undocumented |
| Instance Variable | _log |
Undocumented |
| Instance Variable | _log |
Undocumented |
| Instance Variable | _reporter |
the reporter class to be used. |
| Instance Variable | _result |
Undocumented |
| Instance Variable | _rterrors |
Undocumented |
| Instance Variable | _stream |
stream which the reporter will use. |
| Instance Variable | _tbformat |
Undocumented |
| Instance Variable | _unclean |
Undocumented |
| Instance Variable | _worker |
Undocumented |
| Instance Variable | _worker |
the number of workers to be spawned. |
| Instance Variable | _working |
Undocumented |
def __init__(self, reporterFactory, workerNumber, workerArguments, stream=None, tracebackFormat='default', realTimeErrors=False, uncleanWarnings=False, logfile='test.log', workingDirectory='_trial_temp'):
(source)
¶
Undocumented
Create local worker protocol instances and return them.
| Parameters | |
| protocols | An iterable of LocalWorkerAMP instances. |
| working | The base path in which we should run the workers. |
| Returns | |
| A list of quantity LocalWorker instances. | |
Spawn processes from a list of process protocols.
| Parameters | |
| spawner | A IReactorProcess.spawnProcess implementation. |
| protocols | An iterable of ProcessProtocol instances. |
| arguments | Extra arguments passed to the processes. |
Spawn local worker processes and load tests. After that, run them.
| Parameters | |
| suite | A tests suite to be run. |
reactor:A provider of twisted.internet.interfaces.IReactorProcess | The reactor to use, to be customized in tests. |
| cooperate:function | The cooperate function to use, to be customized in tests. |
| until | If True, continue to run the tests until they fail. |
| Returns | |
DistReporter | The test result. |
Write test run final outcome to result.
| Parameters | |
| result | A TestResult which will print errors and the summary. |
Drive a LocalWorkerAMP instance, iterating the tests and calling run for every one of them.
| Parameters | |
| worker | The LocalWorkerAMP to drive. |
| result | The global DistReporter instance. |
| test | The global list of tests to iterate. |
| cooperate:function | The cooperate function to use, to be customized in tests. |
| Returns | |
| A Deferred firing when all the tests are finished. | |