This project is a scalable, industrial-grade UI automation framework built using Playwright and TypeScript. It follows a Test-Driven Development (TDD) approach and incorporates the Page Object Model (POM) for better maintainability and scalability. The framework also includes Allure Reporting for enhanced reporting capabilities and a logging utility for consistent logging throughout the tests.
ui-automation-framework
├── src
│ ├── pages
│ │ ├── BasePage.ts
│ │ ├── HomePage.ts
│ │ └── LoginPage.ts
│ ├── tests
│ │ └── example.spec.ts
│ ├── utils
│ │ ├── logger.ts
│ │ └── testData.ts
│ └── config
│ └── playwright.config.ts
├── reports
│ └── allure-results
├── .github
│ └── workflows
│ └── ci.yml
├── .vscode
│ └── settings.json
├── .gitignore
├── package.json
├── tsconfig.json
└── README.md
-
Clone the repository
git clone <repository-url> cd ui-automation-framework
-
Install dependencies
npm install
-
Run tests
npm test
- The framework uses the Page Object Model (POM) to separate the test logic from the UI interactions.
- Create new page objects by extending the
BasePage
class located insrc/pages/BasePage.ts
. - Write test cases in the
src/tests
directory, utilizing the page objects for interactions.
- The framework includes a logging utility located in
src/utils/logger.ts
. Use this utility to log messages at different levels (info, warn, error) throughout your tests.
- Allure Reporting is integrated into the framework. Test results will be generated in the
reports/allure-results
directory after executing the tests.
- Contributions are welcome! Please fork the repository and submit a pull request with your changes.
- Ensure that your code adheres to the project's coding standards and includes appropriate tests.
This project is licensed under the ISC License.