bugster


Namebugster JSON
Version 0.6.4 PyPI version JSON
download
home_pagehttps://www.bugster.dev
SummaryPython-Playwright based testing framework for Bugster's e2e testing agent
upload_time2024-12-20 14:34:05
maintainerNone
docs_urlNone
authorNaquiao
requires_python<4.0,>=3.11
licenseMIT
keywords testing bugster playwright pytest
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Bugster Framework

Bugster is a powerful, flexible testing framework built on top of Playwright and pytest. It's designed to simplify the process of writing and managing end-to-end tests for web applications, with a focus on supporting multiple client configurations.

## Features

- Built on Playwright for robust, cross-browser testing
- Seamless integration with pytest
- Support for client-specific configurations and login strategies
- Custom `@login` decorator for easy test marking
- Flexible page object model with `BugsterPage`

## Installation

You can install Bugster using pip:

```bash
pip install bugster
```

This will install Bugster and its dependencies (including pytest and playwright).

After installation, you need to install the Playwright browsers:

```bash
playwright install
```

## Usage

### Basic Setup

1. Create a client configuration repository with the following structure:

```
customer-configs/
├── customer1/
│   ├── config.py
│   └── login_strategy.py
├── customer2/
│   ├── config.py
│   └── login_strategy.py
└── ...
```

2. In your test files, use the `@login` decorator to mark tests that require login:

```python
from bugster.decorators import login

@login
def test_requires_login(page):
    assert page.is_visible("text=Welcome")

def test_does_not_require_login(page):
    assert page.is_visible("text=Login")

@login
class TestLoggedInFeatures:
    def test_feature_1(self, page):
        assert page.is_visible("text=Feature 1")
```

### Running Tests

To run your tests, use pytest with the `--customer-id` option:

```bash
pytest --customer-id customer1 /path/to/your/tests
```

### Writing Client Configurations

In each client's `config.py`:

```python
from bugster.config.base_config import BaseConfig
from .login_strategy import CustomLoginStrategy

class CustomerConfig(BaseConfig):
    LOGIN_STRATEGY = CustomLoginStrategy
    CREDENTIALS = {
        "username": "customeruser",
        "password": "customerpass"
    }
    # Add any other customer-specific configuration here
```

In each client's `login_strategy.py`:

```python
from bugster.login.base_login_strategy import BaseLoginStrategy

class CustomLoginStrategy(BaseLoginStrategy):
    def login(self, page, credentials):
        page.goto("https://customer.example.com/login")
        page.fill("#username", credentials["username"])
        page.fill("#password", credentials["password"])
        page.click("#login-button")
        page.wait_for_selector("#welcome-message")
```

## Advanced Usage

Bugster provides a `BugsterPage` class that wraps Playwright's `Page` object, providing additional functionality. You can extend this class for custom page objects:

```python
from bugster.core.bugster_page import BugsterPage

class MyCustomPage(BugsterPage):
    def custom_action(self):
        # Implement custom action here
        pass
```

## Contributing

We welcome contributions to Bugster! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) file for details on how to contribute.

## License

Bugster is released under the MIT License. See the [LICENSE](LICENSE) file for details.

## Changelog

See the [CHANGELOG.md](CHANGELOG.md) file for details on what has changed in each version of Bugster.

## Support

If you encounter any issues or have questions, please file an issue on the [GitHub issue tracker](https://github.com/yourusername/bugster/issues).

## Acknowledgements

Bugster is built on top of the excellent [Playwright](https://playwright.dev/) and [pytest](https://docs.pytest.org/) projects. We're grateful to the maintainers and contributors of these projects for their fantastic work.
            

Raw data

            {
    "_id": null,
    "home_page": "https://www.bugster.dev",
    "name": "bugster",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "testing, bugster, playwright, pytest",
    "author": "Naquiao",
    "author_email": "nacho-solorzano@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/05/6e/972caadd8d130188aaa19e7550afecced85745a393e0b6e9c4a378e52e4b/bugster-0.6.4.tar.gz",
    "platform": null,
    "description": "# Bugster Framework\n\nBugster is a powerful, flexible testing framework built on top of Playwright and pytest. It's designed to simplify the process of writing and managing end-to-end tests for web applications, with a focus on supporting multiple client configurations.\n\n## Features\n\n- Built on Playwright for robust, cross-browser testing\n- Seamless integration with pytest\n- Support for client-specific configurations and login strategies\n- Custom `@login` decorator for easy test marking\n- Flexible page object model with `BugsterPage`\n\n## Installation\n\nYou can install Bugster using pip:\n\n```bash\npip install bugster\n```\n\nThis will install Bugster and its dependencies (including pytest and playwright).\n\nAfter installation, you need to install the Playwright browsers:\n\n```bash\nplaywright install\n```\n\n## Usage\n\n### Basic Setup\n\n1. Create a client configuration repository with the following structure:\n\n```\ncustomer-configs/\n\u251c\u2500\u2500 customer1/\n\u2502   \u251c\u2500\u2500 config.py\n\u2502   \u2514\u2500\u2500 login_strategy.py\n\u251c\u2500\u2500 customer2/\n\u2502   \u251c\u2500\u2500 config.py\n\u2502   \u2514\u2500\u2500 login_strategy.py\n\u2514\u2500\u2500 ...\n```\n\n2. In your test files, use the `@login` decorator to mark tests that require login:\n\n```python\nfrom bugster.decorators import login\n\n@login\ndef test_requires_login(page):\n    assert page.is_visible(\"text=Welcome\")\n\ndef test_does_not_require_login(page):\n    assert page.is_visible(\"text=Login\")\n\n@login\nclass TestLoggedInFeatures:\n    def test_feature_1(self, page):\n        assert page.is_visible(\"text=Feature 1\")\n```\n\n### Running Tests\n\nTo run your tests, use pytest with the `--customer-id` option:\n\n```bash\npytest --customer-id customer1 /path/to/your/tests\n```\n\n### Writing Client Configurations\n\nIn each client's `config.py`:\n\n```python\nfrom bugster.config.base_config import BaseConfig\nfrom .login_strategy import CustomLoginStrategy\n\nclass CustomerConfig(BaseConfig):\n    LOGIN_STRATEGY = CustomLoginStrategy\n    CREDENTIALS = {\n        \"username\": \"customeruser\",\n        \"password\": \"customerpass\"\n    }\n    # Add any other customer-specific configuration here\n```\n\nIn each client's `login_strategy.py`:\n\n```python\nfrom bugster.login.base_login_strategy import BaseLoginStrategy\n\nclass CustomLoginStrategy(BaseLoginStrategy):\n    def login(self, page, credentials):\n        page.goto(\"https://customer.example.com/login\")\n        page.fill(\"#username\", credentials[\"username\"])\n        page.fill(\"#password\", credentials[\"password\"])\n        page.click(\"#login-button\")\n        page.wait_for_selector(\"#welcome-message\")\n```\n\n## Advanced Usage\n\nBugster provides a `BugsterPage` class that wraps Playwright's `Page` object, providing additional functionality. You can extend this class for custom page objects:\n\n```python\nfrom bugster.core.bugster_page import BugsterPage\n\nclass MyCustomPage(BugsterPage):\n    def custom_action(self):\n        # Implement custom action here\n        pass\n```\n\n## Contributing\n\nWe welcome contributions to Bugster! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) file for details on how to contribute.\n\n## License\n\nBugster is released under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Changelog\n\nSee the [CHANGELOG.md](CHANGELOG.md) file for details on what has changed in each version of Bugster.\n\n## Support\n\nIf you encounter any issues or have questions, please file an issue on the [GitHub issue tracker](https://github.com/yourusername/bugster/issues).\n\n## Acknowledgements\n\nBugster is built on top of the excellent [Playwright](https://playwright.dev/) and [pytest](https://docs.pytest.org/) projects. We're grateful to the maintainers and contributors of these projects for their fantastic work.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python-Playwright based testing framework for Bugster's e2e testing agent",
    "version": "0.6.4",
    "project_urls": {
        "Homepage": "https://www.bugster.dev",
        "Repository": "https://github.com/Bugsterapp/bugster-framework"
    },
    "split_keywords": [
        "testing",
        " bugster",
        " playwright",
        " pytest"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d63f177b20b145b55c72c6ce46f0180f8d699c9da3dc98b08b881ebf18bddced",
                "md5": "40a9bd681051922b1e131bdfc200a614",
                "sha256": "c783b8786bc137981e9f5746533e887bb1f80bf8bd5efa6804937a00219fb2ba"
            },
            "downloads": -1,
            "filename": "bugster-0.6.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "40a9bd681051922b1e131bdfc200a614",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 14287,
            "upload_time": "2024-12-20T14:34:03",
            "upload_time_iso_8601": "2024-12-20T14:34:03.419237Z",
            "url": "https://files.pythonhosted.org/packages/d6/3f/177b20b145b55c72c6ce46f0180f8d699c9da3dc98b08b881ebf18bddced/bugster-0.6.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "056e972caadd8d130188aaa19e7550afecced85745a393e0b6e9c4a378e52e4b",
                "md5": "be72b4584c87913007371158e1853fb9",
                "sha256": "a19928ca32be4f56c2e2e888bedc0d0cd5390ebb7b8fa90936a122dd1cce9b31"
            },
            "downloads": -1,
            "filename": "bugster-0.6.4.tar.gz",
            "has_sig": false,
            "md5_digest": "be72b4584c87913007371158e1853fb9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 11733,
            "upload_time": "2024-12-20T14:34:05",
            "upload_time_iso_8601": "2024-12-20T14:34:05.851203Z",
            "url": "https://files.pythonhosted.org/packages/05/6e/972caadd8d130188aaa19e7550afecced85745a393e0b6e9c4a378e52e4b/bugster-0.6.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-20 14:34:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Bugsterapp",
    "github_project": "bugster-framework",
    "github_not_found": true,
    "lcname": "bugster"
}
        
Elapsed time: 0.40384s