Skip to content

Stixden/testAssignment

Repository files navigation

Test Assignment

Table of Contents

Requirements

  • Node.js >= 22.x
  • npm >= 10.x
  • recommendation:
    • use nvm(node version manager) for needed version switching.
    • to add node version auto-switching script for zsh (as project has .nvmrc file) for version changing on project open. May be found for other terminals or made for needed with ChatGPT help.

Installation

Use npm to install needed packages.

npm install

# in case of the first Playwright installation, specific browsers are required:
npx playwright install

Running Tests

Using Playwright Test Extension

For running single tests / debugging - highly recommended way, to use Playwright Test extension. In the "Testing" tab you should check all the projects to be able to run any test using the play button next to the test(in test file located by project path).

Running Tests via CLI

To run a group of tests via CLI, you can use the following commands:

# to run list of desktop / api tests
npm run test-desktop
npm run test-api

Test execution overseeing

For local report viewing use following command:

# to see generated html report of tests execution
npx playwright show-report

Project structure

  • app - test framework code and application logic.
    • api - API related functionality and API models.
    • data - test data (authorization profiles, component data, error messages).
    • fixtures - custom Playwright fixtures for tests.
    • pages - page objects and component classes used in tests.
      • common - shared page objects.
      • components - UI component classes.
    • types - TypeScript type definitions.
    • utils - helper functions and utilities.
  • tests - test specifications.
    • desktop - desktop tests.
    • api - API tests.

Author - Alex Chub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published