https://github.com/yyvess/playwright-mocha
Howto run end-to-end testing with Playwright & Mocha
https://github.com/yyvess/playwright-mocha
automation browser integration-testing mocha playwright test testing
Last synced: about 2 months ago
JSON representation
Howto run end-to-end testing with Playwright & Mocha
- Host: GitHub
- URL: https://github.com/yyvess/playwright-mocha
- Owner: yyvess
- License: apache-2.0
- Created: 2021-02-21T08:58:25.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-21T11:47:49.000Z (about 4 years ago)
- Last Synced: 2025-01-17T08:37:21.115Z (3 months ago)
- Topics: automation, browser, integration-testing, mocha, playwright, test, testing
- Language: JavaScript
- Homepage:
- Size: 743 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🎠Test automation with Playwright & Mocha
Howto run end-to-end testing with Playwright & Mocha
[](https://asciinema.org/a/392786?autoplay=1)
## Prerequisite
* Install node [Node](https://nodejs.org/en/download/)
## Initalize the project
* Clone this project
```
git clone https://github.com/yyvess/playwright-mocha.git
cd playwright-mocha
```* Run npm install to download project dependancies
```
npm install
```## Usage
### Run tests on headless mode with Chromium
```
npm test
```### Run test on headless mode with Firefox
```
npm run test:firefox
```### Run tests on 'head' mode
Run tests with browser visible
```
npm run test:head
```### Run tests with watch mode
Rerun tests on file changes.
```
npm run test:watch
```### Run your test on Github Actions
[main.yml](https://github.com/yyvess/playwright-mocha/blob/main/.github/workflows/main.yml)### Record your tests
* [Record videos](https://playwright.dev/docs/videos?_highlight=record)
* [Take screenshoots](https://playwright.dev/docs/screenshots/#Screenshots)
[](captures/videos.webm?raw=true)## External documentation
* [Playwright](https://playwright.dev/)
* [Mocha](https://mochajs.org/)
* [Chai expect](https://www.chaijs.com/api/bdd/)