Skip to main content

vedro-flaky-steps plugin for vedro framework

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vedro-flaky-steps-1.1.2.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

vedro_flaky_steps-1.1.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file vedro-flaky-steps-1.1.2.tar.gz.

File metadata

  • Download URL: vedro-flaky-steps-1.1.2.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for vedro-flaky-steps-1.1.2.tar.gz
Algorithm Hash digest
SHA256 6827202c58635b174cb6fe7532658854c311061d2f14b405d860b231aedd63a2
MD5 9ba395b4ae3be50452e67621366bd03a
BLAKE2b-256 74834d33dc09c4077fc66e93e545b77e172cec2d0889d90331c078191bf35c70

See more details on using hashes here.

File details

Details for the file vedro_flaky_steps-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for vedro_flaky_steps-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 57d51963b7119e6b199b214f410c6c7a1ccbce8cdbc0ac1d70d22abbb58c736d
MD5 f1bfa686bf4b1a164127e7bcf59485b0
BLAKE2b-256 1e62194ed6738dbfd64ea1b572d219d120c40a272257fddb5f2db2d261538c0d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page