Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ozlemkorpe/api-and-ui-automation-on-rest-api-test-site-with-playwright
This repository contains a demo project that automates both UI and API testing for the "Rest API Test Site" using Playwright and TypeScript. The project is structured to handle testing scenarios and serves as a guide for integrating UI and API tests within a single framework.
https://github.com/ozlemkorpe/api-and-ui-automation-on-rest-api-test-site-with-playwright
playwright typescript
Last synced: about 1 month ago
JSON representation
This repository contains a demo project that automates both UI and API testing for the "Rest API Test Site" using Playwright and TypeScript. The project is structured to handle testing scenarios and serves as a guide for integrating UI and API tests within a single framework.
- Host: GitHub
- URL: https://github.com/ozlemkorpe/api-and-ui-automation-on-rest-api-test-site-with-playwright
- Owner: ozlemkorpe
- Created: 2024-12-20T22:15:27.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-20T23:07:15.000Z (about 2 months ago)
- Last Synced: 2024-12-20T23:22:10.341Z (about 2 months ago)
- Topics: playwright, typescript
- Language: TypeScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rest API Test Site - Playwright Project
This repository contains a demo project that automates both UI and API testing for the "Rest API Test Site" using [Playwright](https://playwright.dev/) and [TypeScript](https://www.typescriptlang.org/). The project is structured to handle testing scenarios and serves as a guide for integrating UI and API tests within a single framework.
---
## Project Features
- **UI Testing**:
- Automates user interactions on the Rest API Test Site.
- Validates key elements like buttons, forms, and navigation flows.
- Ensures visibility and functionality of critical UI components.- **API Testing**:
- Validates REST API endpoints for correct responses and data.
- Tests different authentication types (e.g., Basic Auth, Bearer Token).
- Handles scenarios like error responses, missing headers, and invalid requests.---
## Project Setup
### Prerequisites
- Node.js (>= 16.x)
- npm or yarn
- Git### Installation
1. Clone this repository:
2. Install dependencies:
```bash
npm install
```3. Install Playwright browsers:
```bash
npx playwright install
```---
## Running Tests
### Running All Tests
```bash
npx playwright test
```### Running UI Tests Only
```bash
npx playwright test tests/ui
```### Running API Tests Only
```bash
npx playwright test tests/api
```### Running a Specific Test
```bash
npx playwright test tests/api/comments.spec.ts
```## Acknowledgments
- [Playwright](https://playwright.dev/)
- [TypeScript](https://www.typescriptlang.org/)Happy Testing!