|
1 |
| -# playwright-api-testing |
| 1 | +--- |
| 2 | +# Playwright API Testing Setup Guide |
| 3 | +--- |
| 4 | + |
2 | 5 | This is a Playwright API testing framework designed to demonstrate playwright api testing example
|
| 6 | + |
| 7 | +## Features of this framework |
| 8 | +* Playwright Reporting |
| 9 | +* [Reporting: Allure](https://www.npmjs.com/package/allure-playwright) |
| 10 | +* [Cloud Integration: LambdaTest](http://www.lambdatest.com?fp_ref=md-moeen-ajaz40) |
| 11 | + |
| 12 | +## Getting started |
| 13 | + |
| 14 | +### Pre-requisites |
| 15 | +* Download and install Node.js |
| 16 | +* Download and install any Text Editor like Visual Code/Sublime/Brackets |
| 17 | + |
| 18 | +### Setup Visual Code |
| 19 | +* Install GitLens Extension from the Marketplace: `GitLens — Git supercharged by GitKraken https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens` |
| 20 | +* Go to Visual Code Preference > Setting and search `formatOnSave` and enable/ON it. |
| 21 | + |
| 22 | +### Setup Scripts |
| 23 | +* Clone the repository into a folder |
| 24 | +* Go to Project root directory and install Dependency: `npm install` |
| 25 | +* All the dependencies from package.json would be installed in node_modules folder. |
| 26 | + |
| 27 | +## How to Run Test Locally |
| 28 | +* Go to the Project root directory and run command: `npm test` |
| 29 | + |
| 30 | +## How to view default Playwright HTML report |
| 31 | +* Go to the Project root directory: `./playwright-report/index.html` |
| 32 | + |
| 33 | +### Playwright HTML Test Report |
| 34 | + |
| 35 | + |
| 36 | +## How to view Allure HTML report |
| 37 | +* Go to the Project root directory and run command: `npm run allure-reporter` and then run `npm run generate-allure-report` |
| 38 | +* Go to the Project root directory: `./allure-report/index.html` |
| 39 | + |
| 40 | +### Allure Test Report |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +## How to Run Test on LambdaTest Cloud |
| 46 | +* Go to Project root directory and run command: `npm run lambdatest` |
| 47 | + |
| 48 | +### Terminal Test Result |
| 49 | + |
| 50 | + |
| 51 | +### LambdaTest Cloud Results |
| 52 | + |
| 53 | + |
| 54 | + |
0 commit comments