bdd-tags-processor


Namebdd-tags-processor JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/qarampage/bdd-tags-processor
SummaryFilter Cucumber BDD Feature files based on Scenario Tag expressions
upload_time2025-08-24 14:36:29
maintainerNone
docs_urlNone
authorQA Rampage
requires_pythonNone
licenseGPL-3.0-or-later
keywords bdd cucumber tag expression processor filter feature files
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BDD Tag Expression Processor

The module wil filter the Feature files based on the given scenario tag expressions. The expression can be created
freehand in the following format.

## Rules

* All the Feature files must have at least a single line space between each block in the feature files.
  * _Feature, Background, Scenario, Scenario Outline_
* The Left side is always the ANDs and Right side is always the ORs
* The bridge between ANDs and ORs is **and (**
* Tags that we want to exclude are prefixed with a ~ symbol.
    * _Eg. NoRuns can be either the default ~@norun or any tags such as ~@p3_
* All the scenarios that are filtered are arranged back into their original files and a @final tag is placed in the tag
  list
  * _All the comments, and extra spaces are removed from the feature file_

## Test Samples

```
Given expression: {@web}
	 Result: --> NoRuns: [],  Ands: ['@web'], Ors: []

Given expression:   {  @web    and @regression    and ~@norun}
	 Result: --> NoRuns: ['@norun'],  Ands: ['@web', '@regression'], Ors: []

Given expression: {~@norun and @web and (@test1 or @test2)}
	 Result: --> NoRuns: ['@norun'],  Ands: ['@web'], Ors: ['@test1', '@test2']

Given expression: {~@norun and (@test1 or @test2)}
	 Result: --> NoRuns: ['@norun'],  Ands: [], Ors: ['@test1', '@test2']

Given expression: {@web and ~@browser and @sanity and ~@norun}
	 Result: --> NoRuns: ['@browser', '@norun'],  Ands: ['@web', '@sanity'], Ors: []

Given expression: {~@norun}
	 Result: --> NoRuns: ['@norun'],  Ands: [], Ors: []

Given expression: {@sanity or @regression}
	 Result: --> NoRuns: [],  Ands: [], Ors: ['@sanity', '@regression']

Given expression: {@web and @browser and ~@norun and (@regression or @Sanity)}
	 Result: --> NoRuns: ['@norun'],  Ands: ['@web', '@browser'], Ors: ['@regression', '@Sanity']

Given expression: {@web and ~@norun and (@regression or @Sanity)}
	 Result: --> NoRuns: ['@norun'],  Ands: ['@web'], Ors: ['@regression', '@Sanity']

Given expression: {  ~@web   and   @browser   and   @checkout   and    ~@norun and (  @regression   or   @Sanity    )}
	 Result: --> NoRuns: ['@web', '@norun'],  Ands: ['@browser', '@checkout'], Ors: ['@regression', '@Sanity']

Given expression: {  ~@web   and   @browser   and   @checkout   and    @norun and (  @test1   or   @test2    )}
	 Result: --> NoRuns: ['@web'],  Ands: ['@browser', '@checkout', '@norun'], Ors: ['@test1', '@test2']

Given expression: {  @web   and   @regression   and    @norun and (  @test1   or   @test2    )}
	 Result: --> NoRuns: [],  Ands: ['@web', '@regression', '@norun'], Ors: ['@test1', '@test2']

Given expression: {@web and (@regression or @Sanity)}
	 Result: --> NoRuns: [],  Ands: ['@web'], Ors: ['@regression', '@Sanity']

Given expression: {  @web   and   ~@browser   and   ~@checkout   and    @norun and (  @regression   or   @Sanity    )}
	 Result: --> NoRuns: ['@browser', '@checkout'],  Ands: ['@web', '@norun'], Ors: ['@regression', '@Sanity']

Given expression: {@web and ~@norun and (@p1)}
	 Result: --> NoRuns: ['@norun'],  Ands: ['@web'], Ors: ['@p1']

Given expression: @web
	 Result: --> NoRuns: [],  Ands: ['@web'], Ors: []

Given expression: 
	 Result: --> NoRuns: [],  Ands: [], Ors: []

Given expression: {~@test-2}
	 Result: --> NoRuns: ['@test-2'],  Ands: [], Ors: []

Given expression: {~@norun and @web}
	 Result: --> NoRuns: ['@norun'],  Ands: ['@web'], Ors: []
```


## HOW-TO Execute on CLI
```
$ cd $HOME/$projects/pypi-projects/bdd-tags-processor
$ python3 -m bdd_tags_processor.bdd_tags_expression_processor 1 '{  @web   and   ~@browser   and   ~@checkout   and    @norun and (  @regression   or   @Sanity    )}'
Given expression: {  @web   and   ~@browser   and   ~@checkout   and    @norun and (  @regression   or   @Sanity    )}
	Result: --> NORUNs: ['@browser', '@checkout'],  ANDs: ['@web', '@norun'], ORs: ['@regression', '@Sanity']
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/qarampage/bdd-tags-processor",
    "name": "bdd-tags-processor",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "bdd cucumber tag expression processor filter feature files",
    "author": "QA Rampage",
    "author_email": "16265665+qarampage@users.noreply.github.co",
    "download_url": "https://files.pythonhosted.org/packages/6f/47/fb683b4f20874fedd2db86209ec52737fc61ac32afd154a9caebf434a9be/bdd_tags_processor-0.2.2.tar.gz",
    "platform": null,
    "description": "# BDD Tag Expression Processor\n\nThe module wil filter the Feature files based on the given scenario tag expressions. The expression can be created\nfreehand in the following format.\n\n## Rules\n\n* All the Feature files must have at least a single line space between each block in the feature files.\n  * _Feature, Background, Scenario, Scenario Outline_\n* The Left side is always the ANDs and Right side is always the ORs\n* The bridge between ANDs and ORs is **and (**\n* Tags that we want to exclude are prefixed with a ~ symbol.\n    * _Eg. NoRuns can be either the default ~@norun or any tags such as ~@p3_\n* All the scenarios that are filtered are arranged back into their original files and a @final tag is placed in the tag\n  list\n  * _All the comments, and extra spaces are removed from the feature file_\n\n## Test Samples\n\n```\nGiven expression: {@web}\n\t Result: --> NoRuns: [],  Ands: ['@web'], Ors: []\n\nGiven expression:   {  @web    and @regression    and ~@norun}\n\t Result: --> NoRuns: ['@norun'],  Ands: ['@web', '@regression'], Ors: []\n\nGiven expression: {~@norun and @web and (@test1 or @test2)}\n\t Result: --> NoRuns: ['@norun'],  Ands: ['@web'], Ors: ['@test1', '@test2']\n\nGiven expression: {~@norun and (@test1 or @test2)}\n\t Result: --> NoRuns: ['@norun'],  Ands: [], Ors: ['@test1', '@test2']\n\nGiven expression: {@web and ~@browser and @sanity and ~@norun}\n\t Result: --> NoRuns: ['@browser', '@norun'],  Ands: ['@web', '@sanity'], Ors: []\n\nGiven expression: {~@norun}\n\t Result: --> NoRuns: ['@norun'],  Ands: [], Ors: []\n\nGiven expression: {@sanity or @regression}\n\t Result: --> NoRuns: [],  Ands: [], Ors: ['@sanity', '@regression']\n\nGiven expression: {@web and @browser and ~@norun and (@regression or @Sanity)}\n\t Result: --> NoRuns: ['@norun'],  Ands: ['@web', '@browser'], Ors: ['@regression', '@Sanity']\n\nGiven expression: {@web and ~@norun and (@regression or @Sanity)}\n\t Result: --> NoRuns: ['@norun'],  Ands: ['@web'], Ors: ['@regression', '@Sanity']\n\nGiven expression: {  ~@web   and   @browser   and   @checkout   and    ~@norun and (  @regression   or   @Sanity    )}\n\t Result: --> NoRuns: ['@web', '@norun'],  Ands: ['@browser', '@checkout'], Ors: ['@regression', '@Sanity']\n\nGiven expression: {  ~@web   and   @browser   and   @checkout   and    @norun and (  @test1   or   @test2    )}\n\t Result: --> NoRuns: ['@web'],  Ands: ['@browser', '@checkout', '@norun'], Ors: ['@test1', '@test2']\n\nGiven expression: {  @web   and   @regression   and    @norun and (  @test1   or   @test2    )}\n\t Result: --> NoRuns: [],  Ands: ['@web', '@regression', '@norun'], Ors: ['@test1', '@test2']\n\nGiven expression: {@web and (@regression or @Sanity)}\n\t Result: --> NoRuns: [],  Ands: ['@web'], Ors: ['@regression', '@Sanity']\n\nGiven expression: {  @web   and   ~@browser   and   ~@checkout   and    @norun and (  @regression   or   @Sanity    )}\n\t Result: --> NoRuns: ['@browser', '@checkout'],  Ands: ['@web', '@norun'], Ors: ['@regression', '@Sanity']\n\nGiven expression: {@web and ~@norun and (@p1)}\n\t Result: --> NoRuns: ['@norun'],  Ands: ['@web'], Ors: ['@p1']\n\nGiven expression: @web\n\t Result: --> NoRuns: [],  Ands: ['@web'], Ors: []\n\nGiven expression: \n\t Result: --> NoRuns: [],  Ands: [], Ors: []\n\nGiven expression: {~@test-2}\n\t Result: --> NoRuns: ['@test-2'],  Ands: [], Ors: []\n\nGiven expression: {~@norun and @web}\n\t Result: --> NoRuns: ['@norun'],  Ands: ['@web'], Ors: []\n```\n\n\n## HOW-TO Execute on CLI\n```\n$ cd $HOME/$projects/pypi-projects/bdd-tags-processor\n$ python3 -m bdd_tags_processor.bdd_tags_expression_processor 1 '{  @web   and   ~@browser   and   ~@checkout   and    @norun and (  @regression   or   @Sanity    )}'\nGiven expression: {  @web   and   ~@browser   and   ~@checkout   and    @norun and (  @regression   or   @Sanity    )}\n\tResult: --> NORUNs: ['@browser', '@checkout'],  ANDs: ['@web', '@norun'], ORs: ['@regression', '@Sanity']\n```\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Filter Cucumber BDD Feature files based on Scenario Tag expressions",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/qarampage/bdd-tags-processor"
    },
    "split_keywords": [
        "bdd",
        "cucumber",
        "tag",
        "expression",
        "processor",
        "filter",
        "feature",
        "files"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0932bde6af51f7b6510e2774d74463022e72f6d4ae6bb30e8dc541deee4d1fa1",
                "md5": "86475d3bb5b01b2f307d75f618f90d6c",
                "sha256": "52d173cdef75ccd995336e0aca906cead748f82aa1d3a4ddd08846a97efa9d0b"
            },
            "downloads": -1,
            "filename": "bdd_tags_processor-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "86475d3bb5b01b2f307d75f618f90d6c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5365,
            "upload_time": "2025-08-24T14:36:28",
            "upload_time_iso_8601": "2025-08-24T14:36:28.175006Z",
            "url": "https://files.pythonhosted.org/packages/09/32/bde6af51f7b6510e2774d74463022e72f6d4ae6bb30e8dc541deee4d1fa1/bdd_tags_processor-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6f47fb683b4f20874fedd2db86209ec52737fc61ac32afd154a9caebf434a9be",
                "md5": "8083dd67eeabf035a203c671b71bc0ee",
                "sha256": "6893c41466ff18c80ab281969633ed173cfc56fbcab77e25e5ba44c464330e71"
            },
            "downloads": -1,
            "filename": "bdd_tags_processor-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8083dd67eeabf035a203c671b71bc0ee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4704,
            "upload_time": "2025-08-24T14:36:29",
            "upload_time_iso_8601": "2025-08-24T14:36:29.352951Z",
            "url": "https://files.pythonhosted.org/packages/6f/47/fb683b4f20874fedd2db86209ec52737fc61ac32afd154a9caebf434a9be/bdd_tags_processor-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-24 14:36:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "qarampage",
    "github_project": "bdd-tags-processor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "bdd-tags-processor"
}
        
Elapsed time: 1.67712s