You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vedro-lazy-rerunner

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vedro-lazy-rerunner

Rerunner plugin for the Vedro testing framework

0.1.1
pipPyPI
Maintainers
1

vedro-lazy-rerunner

PyPI Python Version

The vedro-lazy-rerunner is a plugin for the Vedro testing framework. It reruns failed scenarios until they pass for the first time. If none of the reruns are successful, the test is marked as failed after the designated number of attempts.

Installation

  • Install the package using pip:
$ pip3 install vedro-lazy-rerunner
  • Then, activate the plugin in your vedro.cfg.py configuration file:
# ./vedro.cfg.py
import vedro
import vedro_lazy_rerunner

class Config(vedro.Config):

    class Plugins(vedro.Config.Plugins):

        class LazyRerunner(vedro_lazy_rerunner.LazyRerunner):
            enabled = True

Usage

Run Vedro with the --lazy-reruns option set to the desired number of reruns:

$ vedro run --lazy-reruns=5

Examples

  • A test will not be rerun further if it passes during one of the reruns:
$ vedro run --lazy-reruns=5
Scenarios
* 
 ✔ check number
 │
 ├─[1/2] ✗ check number
 │
 ├─[2/2] ✔ check number
 
# 1 scenario, 1 passed, 0 failed, 0 skipped (0.01s)

The test passed on the second attempt. The remaining 3 attempts were not needed. The test is considered passed.

  • A test is marked as failed if it does not pass in any of the attempts:
$ vedro run --lazy-reruns=5
Scenarios
* 
 ✗ check number
 │
 ├─[1/5] ✗ check number
 │
 ├─[2/5] ✗ check number
 │
 ├─[3/5] ✗ check number
 │
 ├─[4/5] ✗ check number
 │
 ├─[5/5] ✗ check number

# 1 scenario, 0 passed, 1 failed, 0 skipped (0.02s)

The test is considered failed as it did not pass in any of the 5 attempts.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts