This repository contains a demo project showcasing automated testing using Playwright, a modern end-to-end testing framework.
- End-to-end testing with Playwright
- Cross-browser testing support (Chrome, Firefox, Safari)
- HTML test reports
- Node.js (Latest LTS version recommended)
- npm (comes with Node.js)
- Clone the repository:
git clone [your-repository-url]
cd devconf-demo- Install dependencies:
npm install- Install Playwright browsers:
npx playwright installTo run the tests:
npm run testTo run a specific test file:
npm run test:ui tests/<filename> (run single file)To view the HTML report after running tests:
npm run show-reportdevconf-demo/
├── tests/ # Test files
│ ├── login.spec.ts # Login test implementation
│ ├── inventory.spec.ts # Inventory test implementation
│ ├── login.abstract.spec.ts # Abstract login test
│ └── inventory.abstract.spec.ts # Abstract inventory test
├── tests-examples/ # Example test files
├── pages/ # Page objects and test utilities
├── playwright.config.ts # Playwright configuration
└── package.json # Project dependencies and scripts
The project includes several key test implementations:
login.spec.tsandinventory.spec.ts: Concrete test implementationslogin.abstract.spec.tsandinventory.abstract.spec.ts: Abstract test classes that define the test structure and common functionality
The project uses Playwright's configuration file (playwright.config.ts) with the following features:
- Parallel test execution
- HTML reporter for test results
- Cross-browser testing setup
- CI/CD specific configurations
- Trace collection for failed tests
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Playwright team for the amazing testing framework
- All contributors who have helped shape this project