Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvduardo/playwright-ts
Projeto basico com testes de front e backend usando typescript com framework playwight
https://github.com/dvduardo/playwright-ts
playwright playwright-typescript schedule schedule-tests scheduled-jobs typescript
Last synced: 3 months ago
JSON representation
Projeto basico com testes de front e backend usando typescript com framework playwight
- Host: GitHub
- URL: https://github.com/dvduardo/playwright-ts
- Owner: dvduardo
- License: apache-2.0
- Created: 2024-06-12T22:32:29.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-08T22:14:39.000Z (7 months ago)
- Last Synced: 2024-07-09T03:12:24.702Z (7 months ago)
- Topics: playwright, playwright-typescript, schedule, schedule-tests, scheduled-jobs, typescript
- Language: JavaScript
- Homepage:
- Size: 269 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Playwright Schedule Tests
This project uses GitHub Actions to automate browser tests using Playwright on a scheduled basis. The tests are designed to ensure the reliability and performance of both web and API endpoints.
## Overview
The GitHub Actions workflow defined in `playwright.yml` is triggered by a cron schedule to run tests daily at 14:00 UTC. It includes jobs for testing web interfaces and API endpoints in an isolated, consistent environment.
### Features
- **Scheduled Testing**: Automated tests run daily to ensure ongoing reliability.
- **Docker Integration**: Uses Docker to manage dependencies and ensure a consistent testing environment.
- **Playwright for Browser and API Testing**: Leverages Playwright for end-to-end testing of web and backend applications.## Getting Started
To get started with this project, you'll need to have Docker and Node.js installed on your system. The tests are run in a GitHub Actions workflow, which requires no additional setup for GitHub repositories.
### Prerequisites
- Docker
- Node.js (version 18 is specified in the workflow)### Running Tests Locally
To run the tests locally, follow these steps:
1. **Install Dependencies and start app and database**: Execute de followed command inside *apps/api*
```sh
npm installnpm run db:init
npm start
2. **Install Dependencies and start web application**:Execute de followed command inside *apps/web*
```sh
npm installnpm start
3. **Install Playwright Browsers**:Execute de followed command inside root project
```sh
npx playwright install
4. **Execute tests**:
```sh
npx playwright test
### Workflow Details
The GitHub Actions workflow consists of two main jobs:- **test-web**: This job runs Playwright tests for the web interface.
- **test-api**: Intended for API testing (setup to be completed).The app system wasn't developed by me. I used a project that I saw in a course on Udemy taught by [QAx](https://github.com/qax-education) as a base.
License
This project is open source and available under the MIT License.