The Playwright UI Automation Boilerplate is designed for end-to-end UI testing using Playwright and pytest. It provides a scalable and maintainable framework using the Page Object Model (POM) and supports CI/CD execution with GitHub Actions.
- Page Object Model (POM): Enhances maintainability and reusability.
- Reusable UI Actions: Simplifies interaction with UI elements.
- Logging Support: Uses Python’s
loggingmodule for better debugging. - Parameterized Tests: Supports
pytest.mark.parametrizefor flexible testing. - Tag-Based Execution: Run tests selectively using tags (
login,sorting, etc.). - GitHub Actions Integration: CI/CD pipeline to run tests automatically.
- Allure Reporting: Generates interactive test reports.
git clone https://github.com/your-username/playwright-ui-boilerplate.git
cd playwright-ui-boilerplatepython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txt
playwright installCreate a .env file in the root directory and add:
LOGIN_URL=https://your-login-page.com
USERNAME=your_username
PASSWORD=your_password
pytestpytest -m loginpytest -m sortingUse the runtest.sh script to execute tests and generate an Allure report automatically.
./run_tests.sh- Navigate to the Actions tab in GitHub.
- Select Playwright UI Boilerplate workflow.
- Click "Run workflow" and select a test category (
all,login, orsorting).
After running tests, generate and view the report using:
allure serve allure-results📩 ASWANI R S
📧 aswanirs321@gmail.com
🔗 GitHub Profile