This is a simple project that includes one test, using POM model, TypeScript, Allure reporting.
Playwright is a Node.js library that provides a high-level API for automating browsers (Chromium, Firefox, and WebKit) for various automation tasks, including testing.
Before you begin, ensure you have the following software installed:
- Node.js: https://nodejs.org/
-
Clone this repository to your local machine:
git clone https://github.com/YOUR_NAME/TS_Playwright-example.git
-
npm install
npm install
- npm run test-local-chrome: To run the tests using local Chromium, use the following command.
- npm run test-local-all-browsers: To run the tests in all supported browsers (Chromium, Firefox, Webkit), use the following command
- npm run test:reporter: To generate Allure reports and view them in your default web browser, use the following command. More about allure reports and view you can visit: https://www.npmjs.com/package/allure-playwright
^ depending which suite to run
- @playwright/test: Playwright for end-to-end testing.
- allure-commandline: Allure command-line tool for generating and viewing test reports.
- allure-playwright: Allure integration for Playwright to enhance test reporting.
- axios: Promise-based HTTP client for making HTTP requests.
- dotenv: Loads environment variables from a .env file.
- Adjust allure reporting to have better viewability
- .env file is not added in gitignore just for visibility
- check with structure and make a bit more reusability and dynamic with classes