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 | run |
Run a reactor and a test suite. |
Async 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. |
Instance Variable | stream |
stream which the reporter will use. |
Async 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 . |
Method | _run |
Undocumented |
Class Variable | _logfile |
Undocumented |
Class Variable | _logger |
Undocumented |
Class Variable | _reactor |
Undocumented |
Class Variable | _real |
Undocumented |
Class Variable | _traceback |
Undocumented |
Class Variable | _unclean |
Undocumented |
Class Variable | _worker |
Undocumented |
Class Variable | _working |
Undocumented |
Instance Variable | _exit |
``True`` to stop the run as soon as a test case fails. ``False`` to run through the whole suite and report all of the results at the end. |
Instance Variable | _max |
the number of workers to be spawned. |
Instance Variable | _reporter |
the reporter class to be used. |
async def runAsync(self, suite:
Union[ TestCase, TestSuite]
, untilFailure: bool
= False) -> DistReporter
:
(source)
¶
Spawn local worker processes and load tests. After that, run them.
Parameters | |
suite:Union[ | A test or suite to be run. |
untilbool | If True, continue to run the tests until they fail. |
Returns | |
DistReporter | A coroutine that completes with the test result. |
Write test run final outcome to result.
Parameters | |
result | A TestResult which will print errors and the summary. |
async def _driveWorker(self, result:
DistReporter
, testCases: Sequence[ ITestCase]
, worker: LocalWorkerAMP
):
(source)
¶
Drive a LocalWorkerAMP
instance, iterating the tests and calling run for every one of them.
Parameters | |
result:DistReporter | The global DistReporter instance. |
testSequence[ | The global list of tests to iterate. |
worker:LocalWorkerAMP | The LocalWorkerAMP to drive. |
Returns | |
A coroutine that completes after all of the tests have completed. |