class documentation

class DistTrialRunner: (source)

View In Hierarchy

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 runAsync Spawn local worker processes and load tests. After that, run them.
Method runUntilFailure Run the tests with local worker processes until they fail.
Method writeResults Write test run final outcome to result.
Async Method _driveWorker Drive a LocalWorkerAMP instance, iterating the tests and calling run for every one of them.
Method _makeResult Make reporter factory, and wrap it with a DistReporter.
Class Variable _logfile Undocumented
Class Variable _logger Undocumented
Class Variable _reactor Undocumented
Class Variable _realTimeErrors Undocumented
Class Variable _tracebackFormat Undocumented
Class Variable _uncleanWarnings Undocumented
Class Variable _workerArguments Undocumented
Class Variable _workingDirectory Undocumented
Instance Variable _exitFirst ``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 _maxWorkers the number of workers to be spawned.
Instance Variable _reporterFactory the reporter class to be used.
Instance Variable _stream stream which the reporter will use.
def run(self, suite, untilFailure=False): (source)

Run a reactor and a test suite.

Parameters
suite:TestSuiteThe test suite to run.
untilFailure:boolUndocumented
Returns
TestResultUndocumented
async def runAsync(self, suite, untilFailure=False): (source)

Spawn local worker processes and load tests. After that, run them.

Parameters
suite:TestSuiteA tests suite to be run.
untilFailure:boolIf True, continue to run the tests until they fail.
Returns
DistReporterA coroutine that completes with the test result.
def runUntilFailure(self, suite): (source)

Run the tests with local worker processes until they fail.

Parameters
suiteA tests suite to be run.
def writeResults(self, result): (source)

Write test run final outcome to result.

Parameters
resultA TestResult which will print errors and the summary.
async def _driveWorker(self, result, testCases, worker): (source)

Drive a LocalWorkerAMP instance, iterating the tests and calling run for every one of them.

Parameters
result:DistReporterThe global DistReporter instance.
testCases:Sequence[ITestCase]The global list of tests to iterate.
worker:LocalWorkerAMPThe LocalWorkerAMP to drive.
Returns
A coroutine that completes after all of the tests have completed.
def _makeResult(self): (source)

Make reporter factory, and wrap it with a DistReporter.

Returns
DistReporterUndocumented
_logfile: str = (source)

Undocumented

_logger = (source)

Undocumented

Undocumented

_realTimeErrors: bool = (source)

Undocumented

_tracebackFormat: str = (source)

Undocumented

_uncleanWarnings: bool = (source)

Undocumented

_workerArguments: List[str] = (source)

Undocumented

_workingDirectory: str = (source)

Undocumented

_exitFirst: bool = (source)

``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.

_maxWorkers: int = (source)

the number of workers to be spawned.

_reporterFactory: Callable[..., IReporter] = (source)

the reporter class to be used.

_stream: TextIO = (source)

stream which the reporter will use.