Skip to main content

Vedro Flaky Steps Plugin

How to install?

To install plugin, follow these steps:

Using pip:

$ pip install git+https://github.com/miner34006/vedro-flaky-steps@main

OR

$ pip install vedro-flaky-steps

Using Vedro plugin manager:

$ vedro plugin install vedro-allure-reporter

How to use?

First you need to deactivate rerunner plugin and activate vedro-flakys-steps plugin (reruns are available with same --reruns option)

# ./vedro.cfg.py
import vedro
import vedro.plugins.rerunner as rerunner
import vedro_flaky_steps as flaker

class Config(vedro.Config):

    class Plugins(vedro.Config.Plugins):

        class Rerunner(rerunner.Rerunner):
            enabled = False

        class FlakySteps(flaker.FlakySteps):
            enabled = True

Then you can use @expected_failure decorator in your Vedro scenarios:

class Scenario(vedro.Scenario):
    @expected_failure('.*random.randint.*', continue_on_error=True, comment='your message here')
    def your_flaky_step(self):
        assert random.randint(0, 1)

Behaviour

expected_failure has 3 options:

  • expected_error_regexp - regular expression to find your expected flaky error.
  • continue_on_error - flag that tells the plugin whether to perform further steps, when met expected flaky error. If set to True the next step will be executed when flaky step failed with expected error. If set to False scenario will be finished on that step (scenario will have a success status).
  • comment - any information that will be printed in case expected flaky error was met.

After all scenarios have been finished, summary will be displayed in case at least one flaky error was met:

# 1 expected errors met in 1 scenarios, 1 errors skipped

Metadata

Release files for vedro-flaky-steps 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vedro-flaky-steps 1.1.2
File Size Uploaded
vedro-flaky-steps-1.1.2.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vedro-flaky-steps 1.1.2
File Interpreter ABI Platform
vedro_flaky_steps-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.6 kB

Release files / vedro-flaky-steps-1.1.2.tar.gz

Download URL vedro-flaky-steps-1.1.2.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6827202c58635b174cb6fe7532658854c311061d2f14b405d860b231aedd63a2
BLAKE2b-256 checksum
How to use checksums
74834d33dc09c4077fc66e93e545b77e172cec2d0889d90331c078191bf35c70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release files / vedro_flaky_steps-1.1.2-py3-none-any.whl

Download URL vedro_flaky_steps-1.1.2-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57d51963b7119e6b199b214f410c6c7a1ccbce8cdbc0ac1d70d22abbb58c736d
BLAKE2b-256 checksum
How to use checksums
1e62194ed6738dbfd64ea1b572d219d120c40a272257fddb5f2db2d261538c0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page