Skip to main content

Vedro tags with boolean logic

Project description

Vedro Advanced Tags

Codecov PyPI PyPI - Downloads Python Version

(!) Starting from Vedro v1.10, the default Tagger plugin supports boolean logic in tags. Therefore, you don't need to install vedro-advanced-tags if you're using Vedro version 1.10 or later. You can use the boolean logic in tags in the same way as in vedro-advanced-tags.

Installation

Quick

For a quick installation, you can use a plugin manager as follows:

$ vedro plugin install vedro-advanced-tags
$ vedro plugin disable vedro.plugins.tagger

Manual

To install manually, follow these steps:

  1. Install the package using pip:
$ pip3 install vedro-advanced-tags
  1. Next, activate the plugin in your vedro.cfg.py configuration file:
# ./vedro.cfg.py
import vedro
import vedro.plugins.tagger as tagger
import vedro_advanced_tags as adv_tagger

class Config(vedro.Config):

    class Plugins(vedro.Config.Plugins):

        class Tagger(tagger.Tagger):
            enabled = False  # disable default tagger

        class VedroAdvancedTags(adv_tagger.VedroAdvancedTags):
            enabled = True

Usage

First, add tags to your scenarios:

import vedro

class Scenario(vedro.Scenario):
    subject = "register user"
    tags = ["P0", "API"]

Then, you can run scenarios with specific tags.

AND

To run scenarios that include both specified tags, use the and operator:

$ vedro run --tags "P0 and API"

OR

To run scenarios that contain either of the specified tags, use the or operator:

$ vedro run --tags "API or CLI"

NOT

To run scenarios that do not include a specific tag, use the not operator:

$ vedro run --tags "not P0"

EXPR

To run scenarios that meet multiple conditions, use expressions.

For instance, to execute scenarios that either include the API or CLI tag, and do not include the P0 tag, you can use:

$ vedro run --tags "(API or CLI) and (not P0)"

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_advanced_tags-0.2.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

vedro_advanced_tags-0.2.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file vedro_advanced_tags-0.2.1.tar.gz.

File metadata

  • Download URL: vedro_advanced_tags-0.2.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for vedro_advanced_tags-0.2.1.tar.gz
Algorithm Hash digest
SHA256 021e1c354158bed01171c75bab53a07adad4a445625be2342d53e06e3bdaed27
MD5 64ff2581698ac4eda2171fa96b67f505
BLAKE2b-256 3304f85d10ad15cda23548a811f8caa75fc4dcc3aee1ebf9974681553aec4b38

See more details on using hashes here.

File details

Details for the file vedro_advanced_tags-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for vedro_advanced_tags-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec461729ee1e1a0e1ed6805720ec0b1f76532c6c4548eec2fca552576b66dbbb
MD5 771b75a962c0b4488901622eb7676624
BLAKE2b-256 62128a4c35e3d892a52b0496f50010b3b7e22d748f099aefb2aa18850f6d9f87

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