# 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.8",
"maintainer_email": null,
"keywords": "testing, bugster, playwright, pytest",
"author": "Naquiao",
"author_email": "nacho-solorzano@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/e7/e8/ad82d1aa82a3ef692571f99fb2247e6fef4c26c8af706a3008563d95de05/bugster-0.10.1.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.10.1",
"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": "6b562cd625daf721c192d4220900d2b342bba913ec4a21860036064857a33884",
"md5": "a0eb9352c3e6f2071eca0fbe097c1e8a",
"sha256": "60f3b246a23eb89e87371eee1b80d7b2388a5ec14c44f0f60f828ad82dddd075"
},
"downloads": -1,
"filename": "bugster-0.10.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a0eb9352c3e6f2071eca0fbe097c1e8a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 16795,
"upload_time": "2025-02-19T20:13:38",
"upload_time_iso_8601": "2025-02-19T20:13:38.480290Z",
"url": "https://files.pythonhosted.org/packages/6b/56/2cd625daf721c192d4220900d2b342bba913ec4a21860036064857a33884/bugster-0.10.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e7e8ad82d1aa82a3ef692571f99fb2247e6fef4c26c8af706a3008563d95de05",
"md5": "cedce56052eafb55f7277ea55501848b",
"sha256": "e9ad73b71ec16a560e27b8bd185430b6665c106239bd790e6a105c0a53f8afcd"
},
"downloads": -1,
"filename": "bugster-0.10.1.tar.gz",
"has_sig": false,
"md5_digest": "cedce56052eafb55f7277ea55501848b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 12420,
"upload_time": "2025-02-19T20:13:40",
"upload_time_iso_8601": "2025-02-19T20:13:40.430180Z",
"url": "https://files.pythonhosted.org/packages/e7/e8/ad82d1aa82a3ef692571f99fb2247e6fef4c26c8af706a3008563d95de05/bugster-0.10.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-19 20:13:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Bugsterapp",
"github_project": "bugster-framework",
"github_not_found": true,
"lcname": "bugster"
}