avocado_i2n.plugins.runner module

Specialized test runner for the plugin.

SUMMARY

Copyright: Intra2net AG

INTERFACE

class avocado_i2n.plugins.runner.TestRunner[source]

Bases: SuiteRunner

Test runner for Cartesian graph traversal.

name = 'traverser'
description = 'Runs tests through a Cartesian graph traversal'
all_results_ok() bool[source]

Evaluate if all tests run under this runner have an ok status.

Returns:

whether all tests ended with acceptable status

..todo:: There might be repeated tests here that have eventually

passed so we might need to return an overall “pass” status.

results_from_previous_jobs() None[source]

Parse results from previous job to add to all traversed graph nodes.

async run_test_task(node: TestNode) None[source]

Run a test instance inside a subprocess.

Parameters:

node – test node to run

async run_test_node(node: TestNode, status_timeout: int = 10) bool[source]

Run a test node with a potential retry prefix modification.

Parameters:

node – test node to run

Returns:

whether the test succeeded as a simple boolean test result status

Raises:

AssertionError if the ran test node contains no objects

run_workers(test_suite: TestSuite | TestGraph, params: Params) None[source]

Run all workers in parallel traversing the graph for each.

Parameters:
  • test_suite – test suite to traverse as graph or a custom test graph to traverse

  • params – runtime parameters used for extra customization

Raises:

TypeError if the provided test suite is of unknown type

run_suite(job: Job, test_suite: TestSuite) set[str][source]

Run one or more tests and report with test result.

Parameters:
  • job – job that includes the test suite

  • test_suite – test suite with some tests to run

Returns:

a set with types of test failures