Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kawsar-95/automation-assignment
senior-qa-engineer Assignment
https://github.com/kawsar-95/automation-assignment
aut javascipt playwright qa-automation
Last synced: 4 days ago
JSON representation
senior-qa-engineer Assignment
- Host: GitHub
- URL: https://github.com/kawsar-95/automation-assignment
- Owner: kawsar-95
- Created: 2024-09-25T12:44:45.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2024-11-02T06:48:44.000Z (4 days ago)
- Last Synced: 2024-11-02T07:17:06.075Z (4 days ago)
- Topics: aut, javascipt, playwright, qa-automation
- Language: JavaScript
- Homepage: https://careers.rtcamp.com/assignments/senior-qa-engineer/
- Size: 3.29 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Playwright Test Automation
This repository contains automated tests built using [Playwright](https://playwright.dev/).
## Prerequisites
Before running the Playwright tests, ensure you have the following installed:
- [Node.js](https://nodejs.org/en/) (v12.0.0 or later)
- [npm](https://www.npmjs.com/) (comes with Node.js)## Getting Started
Follow these steps to install dependencies and run the Playwright tests.
### 1. Clone the repository
```bash
git clone https://github.com/kawsar-95/automation-assignment.git
cd
```### 2. Install dependencies
Run the following command to install the required dependencies:
```bash
npm install
```### 3. Install Playwright Browsers
Playwright comes with its own set of browsers. To install them, use:
```bash
npx playwright install
```### 4. Run Playwright Tests
To run all Playwright tests, execute the following command:
```bash
npm test
```### 5. Run a Specific Test File
To run a specific test, you can specify the file path like this:
```bash
npx playwright test tests/assignment.spec.js
```### 6. View Test Report
Playwright generates a test report that you can view in your browser. After running the tests, open the HTML report using:
```bash
npx playwright show-report
```### 7. Debug Mode
You can run tests in headed mode (with the browser UI) for debugging:
```bash
npx playwright test --headed
```### 8. Running Tests with Trace Viewer
To enable tracing for debugging purposes:
```bash
npx playwright test --trace on
```After running tests with traces, open the trace viewer using:
```bash
npx playwright show-trace
```## Folder Structure
```bash
.
├── .github/ # GitHub Actions workflows
│ └── workflows/
├── ManualTesting/ # Manual testing documents
├── node_modules/ # Node.js modules
├── pageobjects/ # Page Object Models
│ └── sauceDemoPage.js
├── playwright-report/ # Playwright test reports
├── test-results/ # Test results
├── tests/ # Test files
│ └── assignment.spec.js
│ └── assignment.spec.js-snapshots
├── utils/ # Utility files
├── .gitignore # Git ignore file
├── package.json # Node.js dependencies and scripts
├── playwright.config.js # Playwright configuration file
└── README.md # This file
```## Key Sections
1. **Prerequisites:** Basic tools required to run the Playwright tests.
2. **Installation and Running Tests:** Commands for setup, installation, and running tests.
3. **Running Specific Tests, Reports, and Debugging:** Instructions to run specific tests, view reports, and debug.
4. **Folder Structure:** Outline of your project structure to help navigate through files.## Learn More
For more information on Playwright, visit the official [documentation](https://playwright.dev/docs/intro).