scenario.scenarioevents module

Scenario events.

class ScenarioEvent

Bases: StrEnum

Events described by the scenario framework.

BEFORE_TEST_CASE differs from BEFORE_TEST in that BEFORE_TEST_CASE is triggered within the context of a campaign execution while BEFORE_TEST is triggered within the context of a scenario execution.

The same for AFTER_TEST_CASE compared with AFTER_TEST.

BEFORE_CAMPAIGN = 'scenario.before-campaign'

Before campaign event: triggers handlers at the beginning of the campaign.

BEFORE_TEST_SUITE = 'scenario.before-test-suite'

Before test suite event: triggers handlers at the beginning of each test suite.

BEFORE_TEST_CASE = 'scenario.before-test-case'

Before test case event: triggers handlers at the beginning of each test case.

BEFORE_TEST = 'scenario.before-test'

Before test event: triggers handlers at the beginning of the scenario.

BEFORE_STEP = 'scenario.before-step'

Before step event: triggers handlers before each regular step.

ERROR = 'scenario.error'

Error event: triggers handlers on test errors.

AFTER_STEP = 'scenario.after-step'

After step event: triggers handlers after each regular step.

AFTER_TEST = 'scenario.after-test'

After test event: triggers handlers at the end of the scenario.

AFTER_TEST_CASE = 'scenario.after-test-case'

After test case event: triggers handlers after each test case.

AFTER_TEST_SUITE = 'scenario.after-test-suite'

After test suite event: triggers handlers after each test suite.

AFTER_CAMPAIGN = 'scenario.after-campaign'

After campaign event: triggers handlers after the campaign.

class ScenarioEventData

Bases: ABC

Container classes associated with ScenarioEvent events.

class Campaign

Bases: object

ScenarioEvent.BEFORE_CAMPAIGN and ScenarioEvent.AFTER_CAMPAIGN data container.

__init__(campaign_execution)
Parameters:

campaign_execution – Campaign notified.

campaign

Campaign notified.

class TestSuite

Bases: object

ScenarioEvent.BEFORE_TEST_SUITE and ScenarioEvent.AFTER_TEST_SUITE data container.

__init__(test_suite_execution)
Parameters:

test_suite_execution – Test suite notified.

test_suite

Test suite notified.

class TestCase

Bases: object

ScenarioEvent.BEFORE_TEST_CASE and ScenarioEvent.AFTER_TEST_CASE data container.

__init__(test_case_execution)
Parameters:

test_case_execution – Test case notified.

test_case

Test case notified.

class Scenario

Bases: object

ScenarioEvent.BEFORE_TEST and ScenarioEvent.AFTER_TEST data container.

__init__(scenario_definition)
Parameters:

scenario_definition – Scenario notified.

scenario

Scenario notified.

class Step

Bases: object

ScenarioEvent.BEFORE_STEP and ScenarioEvent.AFTER_STEP data container.

__init__(step_definition)
Parameters:

step_definition – Step notified.

step

Step notified.

class Error

Bases: object

ScenarioEvent.ERROR data container.

__init__(error)
Parameters:

error – Error notified.

error

Error notified.

_abc_impl = <_abc_data object>