Skip to content

archoleat/browtest

Repository files navigation

Browtest

CodeQL Commitlint Editorconfig Prettier ESLint Markdown ESM Only

Table of Contents

Installation

  1. Clone the repository.

  2. Run pnpm init for install dependencies.

  3. Change the url address in the playwright.config.ts file if necessary.

  4. Start the local server with vite, wepback or next

  5. After all steps start Browtest.

    Learn more about the available modes.

Settings

In playwright.config.ts the minimum settings are set, for more serious testing we advise you to use Chrome, Edge, Firefox or Safari.

In the src/spec-settings.ts you can change the path to the main directory and enable or disable devtools for all tests you run.

By default, devtools are turned off.

Scripts

  • init: Installs dependencies, Husky, Playwright and update submodules.

  • spec:safari:desktop: Runs desktop Safari.

  • spec:safari:mobile: Runs mobile Safari.

  • spec:firefox:desktop: Runs desktop Firefox.

  • spec:chrome:desktop: Runs desktop Chrome.

  • spec:chrome:mobile: Runs mobile Chrome.

  • spec:multiple:desktop: Runs all desktop browsers in parallel.

  • spec:multiple:mobile: Runs all mobile browsers in parallel.

  • spec:all: Runs all tests from desktop/ and mobile/ folders.

  • screenshot:desktop:all: Creates screenshots for all desktop browsers.

    Screenshots are saved at spec-results/screenshots/{browserName}-{dateNow}.png.

Contributing

Please read CONTRIBUTING to start contributing.

License

This project is licensed under the MIT license.