twisted.trial._dist.disttrial.DistTrialRunner(object) class documentationtwisted.trial._dist.disttrial
(View In Hierarchy)
A specialized runner for distributed trial. The runner launches a number of local worker processes which will run tests.
| Method | __init__ | Undocumented | 
| Method | writeResults | Write test run final outcome to result. | 
| Method | createLocalWorkers | Create local worker protocol instances and return them. | 
| Method | launchWorkerProcesses | Spawn processes from a list of process protocols. | 
| Method | run | Spawn local worker processes and load tests. After that, run them. | 
| Method | runUntilFailure | Run the tests with local worker processes until they fail. | 
| Instance Variable | _workerNumber | the number of workers to be spawned. (type: int) | 
| Instance Variable | _stream | stream which the reporter will use. | 
| Instance Variable | _reporterFactory | the reporter class to be used. | 
| Method | _makeResult | Make reporter factory, and wrap it with a DistReporter. | 
| Method | _driveWorker | Drive a LocalWorkerAMPinstance, iterating the tests and callingrunfor every one of
them. | 
Write test run final outcome to result.
| Parameters | result | A TestResultwhich will print errors and the summary. | 
Create local worker protocol instances and return them.
| Parameters | protocols | An iterable of LocalWorkerAMPinstances. | 
| workingDirectory | The base path in which we should run the workers. (type: str) | |
| Returns | A list of quantityLocalWorkerinstances. | |
Spawn processes from a list of process protocols.
| Parameters | spawner | A IReactorProcess.spawnProcessimplementation. | 
| protocols | An iterable of ProcessProtocolinstances. | |
| arguments | Extra arguments passed to the processes. | 
Drive a LocalWorkerAMP
instance, iterating the tests and calling run for every one of
them.
| Parameters | worker | The LocalWorkerAMPto drive. | 
| result | The global DistReporterinstance. | |
| testCases | The global list of tests to iterate. | |
| cooperate | The cooperate function to use, to be customized in tests. (type: function) | |
| Returns | A Deferredfiring when all the tests are finished. | |
Spawn local worker processes and load tests. After that, run them.
| Parameters | suite | A tests suite to be run. | 
| reactor | The reactor to use, to be customized in tests. (type: A provider of twisted.internet.interfaces.IReactorProcess) | |
| cooperate | The cooperate function to use, to be customized in tests. (type: function) | |
| untilFailure | If True, continue to run the tests until they fail. (type:bool.) | |
| Returns | The test result. (type: DistReporter) | |