Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prajapatihet/my-playwright-project
This project explores automated testing with Playwright and SafeTest, focusing on creating virtual environments to test without affecting real websites and tracking visual changes through regression testing.
https://github.com/prajapatihet/my-playwright-project
nodejs test-automation
Last synced: about 1 month ago
JSON representation
This project explores automated testing with Playwright and SafeTest, focusing on creating virtual environments to test without affecting real websites and tracking visual changes through regression testing.
- Host: GitHub
- URL: https://github.com/prajapatihet/my-playwright-project
- Owner: prajapatihet
- License: mit
- Created: 2024-10-02T07:08:51.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-27T11:40:15.000Z (2 months ago)
- Last Synced: 2024-10-27T14:21:04.660Z (2 months ago)
- Topics: nodejs, test-automation
- Language: JavaScript
- Homepage:
- Size: 2.78 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π οΈ **E2E Testing with Playwright & SafeTest**
This project is part of my learning journey to **perform automated testing** without affecting real websites, using **Playwright** and **SafeTest** tools. It demonstrates how to create virtual testing environments, automate UI interactions, and track visual changesβall while keeping things isolated and safe.
---
## π― **Project Objectives**
- **Learn to automate testing** for web applications without modifying live websites.
- **Explore Playwright** for E2E testing with smooth browser automation.
- **Experiment with SafeTest** for backend automation and visual regression testing.---
## π **Features**
- **Virtual Environments** for testing in isolation.
- Parallel test execution using **Playwright**.
- Visual snapshot comparison using **SafeTest**.
- Backend automation to streamline complex workflows.---
## βοΈ **Installation Steps**
Make sure you have **Node.js** installed on your machine. Follow these steps to set up the project:
### 1οΈβ£ **Clone the Repository**
```bash
git clone
cd
```### 2οΈβ£ Install Dependencies
```bash
npm install playwright safetest
```### 3οΈβ£ Set Up Playwright Browsers
Playwright requires specific browser binaries to run. Install them with the following command:
```bash
npx playwright install
```### 4οΈβ£ Run Your First Test
Create a sample test file inside the project folder, e.g., example.test.js:
javascript
```bash
const { chromium } = require('playwright');(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
await page.click('text=More information...');
console.log(await page.title());
await browser.close();
})();
```Run the test:
```bash
node example.test.js
```### π Running Tests with SafeTest
For visual regression or backend testing, SafeTest requires additional setup. You can start by creating a SafeTest config file:
```bash
npx safetest init
```Execute SafeTest cases:
```bash
npx safetest run
```### π’ Conclusion
This project serves as a playground to master automated testing with tools like Playwright and SafeTest. It enables me to explore how to test without affecting real websites and provides practical knowledge of browser automation and regression testing.
### π License
This project is licensed under the MIT License.