scenario.stepuserapi module

User API methods for user ScenarioDefinition or StepDefinition overloads.

class StepUserApi

Bases: ABC

Base class that defines the methods made available for user ScenarioDefinition or StepDefinition overloads.

__init__()

Initializes an empty known issue list.

known_issues

Known issues at the definition level.

STEP(description)

Defines the short description of a step.

Parameters:

description – Step description.

Note

We deliberately deviate from PEP8 namings in order to highlight STEP() calls in the final test code.

ACTION(action)

Describes a test action.

Parameters:

action – Action description.

Returns:

True when the test script shall be executed, False otherwise (documentation generation).

Note

We deliberately deviate from PEP8 namings in order to highlight ACTION() calls in the final test code.

RESULT(result)

Describes an expected result.

Parameters:

result – Expected result description.

Returns:

True when the test script shall be executed, False otherwise (documentation generation).

Note

We deliberately deviate from PEP8 namings in order to highlight RESULT() calls in the final test code.

doexecute()

Tells whether test script should be executed.

Returns:

True for test execution, False for documentation generation only, exactly the same as the ACTION() and RESULT() methods do, but without generating any texts.

evidence(evidence)

Saves an evidence for the current action or expected result.

Parameters:

evidence – Evidence text.

goto(to_step_specification)

Makes the execution jump to the given step.

Parameters:

to_step_specification – Step specification of the step to jump to (see stepdefinition.StepSpecificationType).

_abc_impl = <_abc_data object>
knownissue(__id, __message)
knownissue(message, level=None, id=None)

General implementation for related overloads.