firebird-qa


Namefirebird-qa JSON
Version 0.19.2 PyPI version JSON
download
home_pageNone
Summarypytest plugin for Firebird QA
upload_time2024-02-20 16:25:52
maintainerNone
docs_urlNone
authorNone
requires_python<4,>=3.8
licenseMIT License Copyright (c) 2020 FirebirdSQL Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords collections configuration firebird hooks logging protobuf signals trace
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pytest plugin for Firebird QA

## Installation

If you plan to use this plugin for personal purposes (not related to Firebird project QA),
we recommend to use `pipx` to install `pytest` together with `firebird-qa` plugin:

```
pipx install pytest
pipx inject pytest firebird-qa
```

## Configuration

### Firebird-driver configuration

The QA plugin uses firebird-driver to access the Firebird servers, and uses driver configuration
object to set up various driver and server/database connection parameters. The configuration object
is initialized from `firebird-driver.conf` file, and plugin specifically utilizes server sections
in this file. When pytest is invoked, you must specify tested server with `–server <name>` option,
where `<name>` is name of server configuration section in `firebird-driver.conf` file.

This file is stored in firebird-qa repository, and defines default configuration suitable to most QA setups.

Note:

The `firebird-driver.conf` file should be located in QA root directory. In default setup, the QA plugin
is used to test local Firebird installation with default user name and password (SYSDBA/masterkey)
via local server (configuration section).

Important:

The firebird-driver currently does not support specification of client library in server sections.
However, the QA plugin works around that limitation. If server section for tested server contains
`fb_client_library` option specification, it’s copied to global setting.

See configuration chapter in [driver documentation](https://firebird-driver.readthedocs.io) for details.

### Pytest configuration

While it’s not required, it’s recommended to create pytest configuration file in QA root directory.
You may use this file to simplify your use of pytest with addopts option, or adjust pytest behaviour.

Suggested options for `pytest.ini`:
```
console_output_style = count
testpaths = tests
addopts = --server local --install-terminal
```

## Running test for Firebird

To run all tests in suite against local Firebird server, invoke:
```
pytest --server local ./tests
```

Tip: If you created `pytest.ini` with recommended values, you can just invoke pytest without additional parameters.

### pytest report header

When pytest is invoked, a report header is printed on terminal before individual tests are executed.
The QA plugin extend this header with next information:

- Python encodings

  - system
  - locale
  - filesystem

- Information about tested Firebird server

  - conf. section name
  - version
  - mode
  - architecture
  - home directory
  - tools directory
  - used client library

### pytest switches installed by QA plugin

The QA plugin installs several pytest command-line switches. When you run pytest ``--help``,
they are listed in Firebird QA section:
```
Firebird QA:
   --server=SERVER       Server configuration name
   --bin-dir=PATH        Path to directory with Firebird utilities
   --protocol={xnet,inet,inet4,wnet}
                         Network protocol used for database attachments
   --runslow             Run slow tests
   --save-output         Save test std[out|err] output to files
   --skip-deselected={platform,version,any}
                         SKIP tests instead deselection
   --extend-xml          Extend XML JUnit report with additional information
   --install-terminal    Use our own terminal reporter
```

**server:**

REQUIRED option. Section name in firebird-driver.conf with connection parameters for tested server.

**bin-dir:**

Normally, the QA plugin detects and properly sets the directory where Firebird tools are installed.
However, you can set this directory explicitly using the --bin-dir switch.

**protocol:**

Override for network protocol specified in firebird-driver.conf file (or default).

**runslow:**

Tests that run for longer than 10 minutes on equipment used for regular Firebird QA should be
marked as slow. They are not executed, unless this switch is specified.

**save-output:**

_Experimental switch_

When this switch is specified, stdout/stderr output of external Firebird tool executed by
test is stored in `/out` subdirectory. Intended for test debugging.

**skip-deselected:**

Tests that are not applicable to tested server (because they are for specific platform or
Firebird versions) are deselected during pytest collection phase. It means that they are not
shown in test session report. This switch changes the routine, so tests are marked to skip
(with message explaining why) instead deselection, so they show up is session report.

**extend-xml:**

When this switch is used together with `--junitxml` switch, the produced JUnitXML file will
contain additional metadata for testsuite and testcase elements recorded as property sub-elements.

  **Important:**

  Please note that using this feature will break schema verifications for the latest JUnitXML schema.
  This might be a problem when used with some CI servers.

**install-terminal:**

This option changes default pytest terminal reporter that displays pytest NODE IDs, to custom
reporter that displays Firebord QA test IDs.

pytest node IDs are of the form `module.py::class::method` or `module.py::function`.

Firebord QA test IDs are defined in our test metadata.

  **Important:**

  Right now, the custom terminal is opt-in feature. This will be changed in some future release
  to opt-out using new switch.


### Test for use with this plugin

Please read the [plugin documentation](https://firebird-qa.rtfd.io) for instructions how
to create tests that use special support provided by this plugin.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "firebird-qa",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.8",
    "maintainer_email": null,
    "keywords": "Collections,Configuration,Firebird,Hooks,Logging,Protobuf,Signals,Trace",
    "author": null,
    "author_email": "Pavel Cisar <pcisar@users.sourceforge.net>",
    "download_url": "https://files.pythonhosted.org/packages/8d/17/e061cc27e75af5d1d3e73e3a941899dd979c9991915bd7456dbcc45980c3/firebird_qa-0.19.2.tar.gz",
    "platform": null,
    "description": "# pytest plugin for Firebird QA\n\n## Installation\n\nIf you plan to use this plugin for personal purposes (not related to Firebird project QA),\nwe recommend to use `pipx` to install `pytest` together with `firebird-qa` plugin:\n\n```\npipx install pytest\npipx inject pytest firebird-qa\n```\n\n## Configuration\n\n### Firebird-driver configuration\n\nThe QA plugin uses firebird-driver to access the Firebird servers, and uses driver configuration\nobject to set up various driver and server/database connection parameters. The configuration object\nis initialized from `firebird-driver.conf` file, and plugin specifically utilizes server sections\nin this file. When pytest is invoked, you must specify tested server with `\u2013server <name>` option,\nwhere `<name>` is name of server configuration section in `firebird-driver.conf` file.\n\nThis file is stored in firebird-qa repository, and defines default configuration suitable to most QA setups.\n\nNote:\n\nThe `firebird-driver.conf` file should be located in QA root directory. In default setup, the QA plugin\nis used to test local Firebird installation with default user name and password (SYSDBA/masterkey)\nvia local server (configuration section).\n\nImportant:\n\nThe firebird-driver currently does not support specification of client library in server sections.\nHowever, the QA plugin works around that limitation. If server section for tested server contains\n`fb_client_library` option specification, it\u2019s copied to global setting.\n\nSee configuration chapter in [driver documentation](https://firebird-driver.readthedocs.io) for details.\n\n### Pytest configuration\n\nWhile it\u2019s not required, it\u2019s recommended to create pytest configuration file in QA root directory.\nYou may use this file to simplify your use of pytest with addopts option, or adjust pytest behaviour.\n\nSuggested options for `pytest.ini`:\n```\nconsole_output_style = count\ntestpaths = tests\naddopts = --server local --install-terminal\n```\n\n## Running test for Firebird\n\nTo run all tests in suite against local Firebird server, invoke:\n```\npytest --server local ./tests\n```\n\nTip: If you created `pytest.ini` with recommended values, you can just invoke pytest without additional parameters.\n\n### pytest report header\n\nWhen pytest is invoked, a report header is printed on terminal before individual tests are executed.\nThe QA plugin extend this header with next information:\n\n- Python encodings\n\n  - system\n  - locale\n  - filesystem\n\n- Information about tested Firebird server\n\n  - conf. section name\n  - version\n  - mode\n  - architecture\n  - home directory\n  - tools directory\n  - used client library\n\n### pytest switches installed by QA plugin\n\nThe QA plugin installs several pytest command-line switches. When you run pytest ``--help``,\nthey are listed in Firebird QA section:\n```\nFirebird QA:\n   --server=SERVER       Server configuration name\n   --bin-dir=PATH        Path to directory with Firebird utilities\n   --protocol={xnet,inet,inet4,wnet}\n                         Network protocol used for database attachments\n   --runslow             Run slow tests\n   --save-output         Save test std[out|err] output to files\n   --skip-deselected={platform,version,any}\n                         SKIP tests instead deselection\n   --extend-xml          Extend XML JUnit report with additional information\n   --install-terminal    Use our own terminal reporter\n```\n\n**server:**\n\nREQUIRED option. Section name in firebird-driver.conf with connection parameters for tested server.\n\n**bin-dir:**\n\nNormally, the QA plugin detects and properly sets the directory where Firebird tools are installed.\nHowever, you can set this directory explicitly using the --bin-dir switch.\n\n**protocol:**\n\nOverride for network protocol specified in firebird-driver.conf file (or default).\n\n**runslow:**\n\nTests that run for longer than 10 minutes on equipment used for regular Firebird QA should be\nmarked as slow. They are not executed, unless this switch is specified.\n\n**save-output:**\n\n_Experimental switch_\n\nWhen this switch is specified, stdout/stderr output of external Firebird tool executed by\ntest is stored in `/out` subdirectory. Intended for test debugging.\n\n**skip-deselected:**\n\nTests that are not applicable to tested server (because they are for specific platform or\nFirebird versions) are deselected during pytest collection phase. It means that they are not\nshown in test session report. This switch changes the routine, so tests are marked to skip\n(with message explaining why) instead deselection, so they show up is session report.\n\n**extend-xml:**\n\nWhen this switch is used together with `--junitxml` switch, the produced JUnitXML file will\ncontain additional metadata for testsuite and testcase elements recorded as property sub-elements.\n\n  **Important:**\n\n  Please note that using this feature will break schema verifications for the latest JUnitXML schema.\n  This might be a problem when used with some CI servers.\n\n**install-terminal:**\n\nThis option changes default pytest terminal reporter that displays pytest NODE IDs, to custom\nreporter that displays Firebord QA test IDs.\n\npytest node IDs are of the form `module.py::class::method` or `module.py::function`.\n\nFirebord QA test IDs are defined in our test metadata.\n\n  **Important:**\n\n  Right now, the custom terminal is opt-in feature. This will be changed in some future release\n  to opt-out using new switch.\n\n\n### Test for use with this plugin\n\nPlease read the [plugin documentation](https://firebird-qa.rtfd.io) for instructions how\nto create tests that use special support provided by this plugin.\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2020 FirebirdSQL\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "pytest plugin for Firebird QA",
    "version": "0.19.2",
    "project_urls": {
        "Documentation": "https://firebird-qa.rtfd.io",
        "Funding": "https://github.com/sponsors/pcisar",
        "Home": "https://github.com/FirebirdSQL/firebird-qa",
        "Issues": "https://github.com/FirebirdSQL/firebird-qa/issues",
        "Source": "https://github.com/FirebirdSQL/firebird-qa"
    },
    "split_keywords": [
        "collections",
        "configuration",
        "firebird",
        "hooks",
        "logging",
        "protobuf",
        "signals",
        "trace"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6cd2db80e74820de8429d73cfac3642020e6f49f20602f5d6b7b3f0879674280",
                "md5": "2f42e08294ebe9cbb77129023462b97f",
                "sha256": "77a6cdd55c1559271ea427e3a292293f255d102d56b54e45212e5ca2a09e1059"
            },
            "downloads": -1,
            "filename": "firebird_qa-0.19.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2f42e08294ebe9cbb77129023462b97f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.8",
            "size": 36403,
            "upload_time": "2024-02-20T16:25:54",
            "upload_time_iso_8601": "2024-02-20T16:25:54.019135Z",
            "url": "https://files.pythonhosted.org/packages/6c/d2/db80e74820de8429d73cfac3642020e6f49f20602f5d6b7b3f0879674280/firebird_qa-0.19.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8d17e061cc27e75af5d1d3e73e3a941899dd979c9991915bd7456dbcc45980c3",
                "md5": "8fba9917b6b94800873dc2e3946e5b12",
                "sha256": "097a939efff1d90c2e7588294f4c74656ccfb426592bae2abed326fbff5913e5"
            },
            "downloads": -1,
            "filename": "firebird_qa-0.19.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8fba9917b6b94800873dc2e3946e5b12",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.8",
            "size": 34365,
            "upload_time": "2024-02-20T16:25:52",
            "upload_time_iso_8601": "2024-02-20T16:25:52.312789Z",
            "url": "https://files.pythonhosted.org/packages/8d/17/e061cc27e75af5d1d3e73e3a941899dd979c9991915bd7456dbcc45980c3/firebird_qa-0.19.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-20 16:25:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sponsors",
    "github_project": "pcisar",
    "github_not_found": true,
    "lcname": "firebird-qa"
}
        
Elapsed time: 0.18681s