Automation https://letcode.in/ using playwright,POM pattern
- Automation Framework: Playwright
- Build tool: npm
- Bundled Tools: Mocha, Chai
- Language: Javascript,Typescript
- Report: Allure,html-report
- Dependency/Packages:{
"@playwright/test": "^1.20.2",
"@types/adm-zip": "^0.4.34",
"adm-zip": "^0.5.9",
"allure-playwright": "^2.0.0-beta.15",
"clipboardy": "^3.0.0",
"cross-env": "^7.0.3"
}
- IDE: Visual Studio Code
- Automate https://letcode.in/test UI
- Automate Simple Book API
The following software are required:
- nodejs : Download and Install Node JS from
https://nodejs.org/en/download/ - Install Java 8 or above, Allure Reports require Java 8 or higher.
- allure commandline : Install allure command line for generating Allure Reports using
npm install -g allure-commandline
- Clone the repo using below URL
https://github.com/acharjeeauntor/Playwright_letcode.in_Automation.git - Navigate to folder and install npm packages using:
npm install
- For Browser Configuration, change required parameters in "playwright.config.ts".
- For execution entire test suite of functional test on all available browsers simultaneously execute below command where "ENV" can be "functional" or "api",Test Cases are present in "tests" folder:
npx cross-env ENV=functional npm run test:functional - For executing single test case on Chrome browser execute the below command, you can change the browser for execution e.g. if you want to run test cases on Firefox, you can change --project=Firefox against test:single in package.json, just make sure the browser name given matches the name given in playwright.config.ts.
npx cross-env ENV=functional npm run test:single - For executing API test cases, please provide "ENV" value as "api":
npx cross-env ENV=api npm run test:api - For Allure Report generation execute :
npm run allureReport