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.
Instance Variable stream stream which the reporter will use.
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.
Method _run Undocumented
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.
def run(self, test: Union[TestCase, TestSuite]) -> IReporter: (source)

Run a reactor and a test suite.

Parameters
test:Union[TestCase, TestSuite]The test or suite to run.
Returns
IReporterUndocumented
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[TestCase, TestSuite]A test or 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, test: Union[TestCase, TestSuite]) -> IReporter: (source)

Run the tests with local worker processes until they fail.

Parameters
test:Union[TestCase, TestSuite]The test or suite to run.
Returns
IReporterUndocumented
def writeResults(self, result): (source)

Write test run final outcome to result.

Parameters
resultA TestResult which will print errors and the summary.

stream which the reporter will use.

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: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) -> DistReporter: (source)

Make reporter factory, and wrap it with a DistReporter.

def _run(self, test: Union[TestCase, TestSuite], untilFailure: bool) -> IReporter: (source)

Undocumented

_logfile: str = (source)

Undocumented

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.